President Abdel Fattah El Sisi celebrated the release of 32 Egyptian fishermen who were held by Houthi rebels in Yemen.
The fishermen were released on Tuesday after being detained for weeks. They were put on a chartered flight to Cairo from the rebel-held capital, Sanaa, a Houthi-run news agency said.
Mr El Sisi said on Twitter that "intensive efforts" by the government "saved [the men's] lives and yielded their safe transfer to Egyptian lands".
Government ministers waving Egyptian flags greeted the freed men as they disembarked from the plane.
Immigration Minister Nabila Makram told Egypt’s pro-government CBC Extra channel that the government had been trying to negotiate the release of the fishermen with the help of Yemeni and Saudi authorities since mid-December.
The rebels plucked the fishermen from the Red Sea and accused them of trespassing in territorial waters off Yemen's southern coast.
Every year, the Iran-backed rebels detain dozens of fishing boats and other vessels that pass through their waters.
They also target oil tankers and military ships belonging to Saudi Arabia and its coalition partners, which have been fighting in Yemen's civil war since 2015.
Egypt supports the Saudi-led coalition’s efforts to oust the Houthis and restore the internationally-recognized government in Yemen.
But it limits its military involvement to maritime patrols and reconnaissance missions.
Yemen lies on the southern end of the Red Sea, one of the world's most commercially critical channels, congested with oil tankers crossing from the Middle East to Europe.
The waters have become increasingly perilous since 2014 when Houthis seized the Yemeni capital and much of the country's north, sparking a civil war that has become the world's worst humanitarian crisis.