RIYADH/UNITED NATIONS (Reuters) - Yemen’s warring parties have agreed to start withdrawing forces from the main port of Hodeidah under a U.N.-sponsored deal, the United Nations said, following weeks of diplomacy to salvage a pact that stalled over control of the Red Sea city.

FILE PHOTO: Houthi militants ride on the back of a truck as they withdraw, part of a U.N.-sponsored peace agreement signed in Sweden earlier this month, from the Red Sea city of Hodeidah, Yemen December 29, 2018. REUTERS/Abduljabbar Zeyad/File Photo

The Iran-aligned Houthi movement and the Saudi-backed government agreed in talks in December to withdraw troops by Jan. 7 from Hodeidah - a lifeline for millions facing famine - under a truce aimed at averting a full-scale assault on the port and paving the way for negotiations to end the four-year war.

“The parties reached an agreement on Phase 1 of the mutual redeployment of forces,” the U.N. spokesman’s office said in a statement without giving details on what was agreed.

Under Phase 1, the Houthis would withdraw from the ports of Hodeidah, Saleef, used for grains, and Ras Isa, used for oil. This would be met by a retreat of Saudi-led coalition forces from the eastern outskirts of Hodeidah, where battles raged before a ceasefire went into effect on Dec. 18.

Mohammed Ali al-Houthi, the head of the Houthis’ Supreme Revolutionary Committee, said its forces would withdraw 5 km from the ports, while the government forces would retreat by 1 km from the Kilo 7 area, in east Hodeidah city.

The Houthis control Hodeidah, the main entry point for the bulk of Yemen’s commercial and aid imports, while other Yemeni forces backed by the Saudi-led coalition loyal to ousted President Abd-Rabbu Mansour Hadi are massed on the outskirts.

The U.N. statement said the two sides also agreed “in principle” on Phase 2, entailing full redeployment of both parties’ forces in Hodeidah province.

Two sources involved in the negotiations, who declined to be named due to the sensitivity of discussions, said both sides had yet to agree on a withdrawal timeline or on a mechanism for local forces to take over security at the ports and city.

“The U.N. is still discussing how to reduce the gap between the two sides on how to choose the forces that will control the city,” one source told Reuters.

The parties could decide within seven to 10 days on where they would re-position forces, said the other source, adding that Houthi fighters could pull back as far as 20 km (15 miles) from the port in Phase 2.

HUMANITARIAN CORRIDORS

Disagreement on withdrawal had delayed opening humanitarian corridors needed to reach 10 million people on the brink of starvation in Yemen, the poorest country in the Arabian Peninsula.

Under the first phase, the two sides agreed to reopen main roads linking Hodeidah to the Houthi-held capital Sanaa and in Yemen’s third city of Taiz, a U.N. source told Reuters.

The government forces’ retreat will also enable access to Red Sea Mills, which holds some 50,000 tonnes of World Food Programme grain, enough to feed 3.7 million people for a month, the source said. Access to the site has been cut off since September due to fighting.

“The grains could be transported from the Red Sea Mills and the humanitarian aid would be allowed to pass through within 11 days,” al-Houthi said in a Twitter post.

The Hodeidah truce has largely been respected but there have been intermittent skirmishes in flashpoints on the city’s edges.

“One of the problems with this process so far has been that there are political agreements on how to make progress, but then nothing happens on the ground,” said Elizabeth Dickinson, a senior analyst at International Crisis Group.

“Now we theoretically have this agreement to move forward, we need to see someone move on the ground.”

Hodeidah became the focus of the war last year when the coalition twice launched an offensive to seize the port and weaken the Houthis by cutting off their main supply line.

The Sunni Muslim alliance led by Saudi Arabia and the United Arab Emirates intervened in 2015 to restore Hadi’s internationally recognised government that was ousted from power in Sanaa in late 2014.

The conflict, which has killed tens of thousands, is widely seen in the region as a proxy war between Saudi Arabia and Iran. The Houthis deny receiving help from Tehran and say their revolution is against corruption.