Egypt's authorities secured the release of 13 sailors detained at Al-Hudaydah port in western Yemen that is controlled by Houthi fighters, a statement by the foreign affairs ministry said.
"The Egyptian ambassador to Yemen made extensive efforts by contacting the countries security authorities and port officials to ensure the safety of the sailors," the statement read.
"Their health and psychological state-of-mind deteriorated due to the harsh conditions, especially because they were [locked up] close to the location of military operations," the statement said.
The sailors were recently captured by Houthi rebels after their ship accidentally ventured into Al-Hudaydah port, the ministry said.
The sailors will return back to Egypt on a ship run by the World Food Programme on Wednesday. They will first travel from Yemen and then Djibouti before heading home.
Egypt has been participating in the Saudi-led military coalition against the Houthi rebels in Yemen since March 2015.