Yemen's warring parties have agreed to start withdrawing forces from the main port of Hodeidah under a UN-sponsored deal, the United Nations said, following weeks of diplomacy to salvage a pact that stalled over control of the Red Sea city.

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 UN 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 and 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.

The war in Yemen began four years ago and 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. Tens of thousands have died in bombings and because of starvation as a result of the civil war.

Related: Extreme hunger has killed 85,000 Yemeni children during civil war

Peter Salisbury of the Belgium-based International Crisis Group says the war is complex, but explained some of the key parts of the conflict to The World.

"The very simple version of the story is that we have a conflict between the Houthis, this rebel movement from the north of Yemen on the one side who control most of Yemen's northwest highlands, receiving support from Iran, and then on the other side, we have the government of Yemen, which was displaced from Sanaa, the capital, by the Houthis in 2015, which is backed by a coalition led by Saudi Arabia," he says.

Carol Hills: What progress have you seen in the UN-led effort to bring peace to Yemen?

Well, where we've seen progress, we can't really say it's some progress that necessarily will lead to a peace process. During the last six months of 2018, the really major issue in the conflict was a potential battle for Hodeidah. This port and city on Yemen's western coast, it's Red Sea, Hodeidah provides about 70 percent of all goods shipped into Yemen, and Yemen depends on imports for basic things like wheat and rice. A battle for the city would have been really catastrophic and, the UN said, would push the country into a really big famine. So over the final six months of the year, the major diplomatic push was just finding a solution to prevent a battle for an important city. In December we had this meeting in Stockholm, which produced this thing called the Stockholm Agreement, which basically calls for a ceasefire and the demilitarization of Hodeidah.

Related: Rep. McGovern on Yemen: 'I don't believe the Saudis have any intention of stopping this war'

Now, you mentioned Hodeidah. It's a key city, a main port and there are silos of grain there waiting to be distributed. Has any progress been made in getting that grain and flour to the people who need it?

There are multiple grain storage sites in and around Hodeidah. The most important is one called Red Sea Mills, which is on the outer edge of the city and [is what] the World Food Programme was using as its main storage and distribution facility. It's also a mill, it's where wheat is turned to flour. WFP haven't been able to access it since last September. A big part of the conversation has been around how WFP and the UN can get back in there. What we saw this weekend was an agreement for a first phase of military redeployments around Hodeidah in order to provide access to Red Sea Mills.

Yemen has been called the worst humanitarian crisis in the world. In addition to food shortages, what else is making life so difficult for Yemenis?

First, civil wars aren't great for economies. So for a lot of people, the only job they can get is fighting on the frontlines. There's a huge problem with fuel shortages, electricity shortages, which makes it hard for people to get from place to place, to do work, to get to the hospital. There's a shortage of medicine. So all the things that we take more or less for granted as basics in our day-to-day life just aren't there right now.

Related: Young survivors of Yemen school bus air strike return to class amidst fears of future attacks

Peter, you've been working on Yemeni issues for years. Why do you care about what happens there?

I've worked on Yemen for about 10 years now. Most people who have lived and worked in Yemen will tell you that it's just a really magical place. The really sad thing is that most images that people see of the country are of war, destruction and this really deep trauma the country is going through, but it's also this warm, wonderful place unlike no other. Having watched its descent, having gone through the excitement of the Arab Spring, but then watched things get worse and worse after the Arab Spring, I think that my main point of interest is just seeing the country turn some kind of corner. So my friends, the people I know and the majority of Yemenis can live decent, ordinary lives and the country can go back to being some semblance of what it was a decade ago.

This interview has been condensed and edited for clarity. Reuters contributed to this report.