The internationally recognized government of Yemen and the Houthi rebels that currently control the capital, Sana’a, have agreed to exchange over 1,000 prisoners as part of a confidence-building exercise, the United Nations (U.N.) announced on Sunday.

“The two sides will now free 1,081 detainees and prisoners,” U.N. envoy Martin Griffiths said on Sunday at a joint news briefing with the International Committee of the Red Cross (ICRC), Al Jazeera reported. The agreement followed nearly ten days of negotiations as part of a U.N.-brokered prisoners’ exchange committee held in the Swiss village of Glion near Lake Geneva.

“Sources familiar with the talks and Houthi-run Masirah TV said the [Houthi] rebels would release 400 people, including 15 Saudis and four Sudanese, while the coalition [government] would free 681 Houthi fighters in the largest swap since peace talks in Stockholm in December 2018,” according to the report.

Yemen’s government and the Houthi rebels previously signed an agreement in 2015 to exchange 15,000 detainees between them by 2018, but the deal has so far only partially been executed.

“I urge the parties to move forward immediately with the release and to spare no effort in building upon this momentum to swiftly agree to releasing more detainees,” Griffiths said at Sunday’s press conference.

Houthi-run Al-Masirah TV quoted a rebel source as “confirming that a deal had been reached” and saying that both sides “express their commitment to implement the agreement.”

“What matters to us is implementing the deal, not only signing it,” senior Houthi rebel commander Mohamed Ali al-Houthi tweeted on Saturday.

Yemeni Foreign Minister Mohammad al-Hadhrami welcomed the deal in a Twitter statement on Sunday as a “humanitarian” breakthrough. He added that “the government demands the agreement is implemented without stalling.”

ICRC Middle East director Fabrizio Carboni joined Griffiths at Sunday’s press conference. He also urged both parties to provide “security and logistical guarantees” for timely releases.

Houthi rebels removed the leaders of Yemen’s internationally recognized government from power starting in 2014. The nation has crumbled under the weight of ongoing conflict since then in what the U.N. has deemed “the world’s worst humanitarian crisis.”

Since 2015, the war in Yemen has killed “over 50,000 people, including many civilians, and destroyed the [country’s] economy and vital infrastructure,” the U.N. Foundation reports. Roughly 14 million people in Yemen — over half of the country’s population — are at risk of famine, meaning Yemen “is now on the brink of what could be the world’s worst famine in over 100 years.”

Political observers view the conflict as a proxy war between Saudi Arabia and Iran. Yemen’s government is backed by a Saudi-led military coalition, while Iran is widely accused of backing the Shiite Islamist Houthis.