Yemen’s recognised government and the Houthi rebels have agreed to a massive prisoner swap to boost UN efforts for a ceasefire deal, as a rebel delegation flew to Sweden for a fresh round of peace talks.

The agreement was struck by UN envoy Martin Griffiths, who was in the rebel-held capital Sana’a on Tuesday to ensure the Houthis travelled to the talks which are expected to start in Sweden within the next few days.

Under the deal, thousands of prisoners from both sides of the conflict will be released as a key confidence-boosting measure ahead of the negotiations.

Yemeni government official Hadi Haig told AFP that between 1,500 and 2,000 members of pro-government forces and between 1,000 and 1,500 rebels would be released.

Among those who are due to be released is Yemen’s former defence minister Mahmoud al-Subaihi, who has been held by the rebels since before the start of the war. President Abedrabbo Mansour Hadi’s brother Nasser, a general and former senior intelligence official, will also be freed.

The move was immediately welcomed by the International Committee of the Red Cross (ICRC), which will oversee the exchange.

ICRC spokesperson Mirella Hodeib said: “This is one step in the right direction towards the building of mutual trust among Yemeni communities.”

Rebel official Abdel Kader al-Murtadha confirmed the deal, adding that he hoped it would be “implemented without problem”.

Much hope is being pinned on the talks which, if they go ahead, will be the first to take place since 2016.

The three and half year war has sparked the world’s worst humanitarian crisis in terms of numbers and pushed the country to the brink of famine. The United Nations fear as many as 14 million people could starve to death if the fighting rages on and food prices continue to soar.

The conflict first erupted in the spring of 2015 after the Iran-backed Houthi rebels swept control of the country, ousting the recognised President Abedrabbo Mansour Hadi. Saudi Arabia and its Gulf allies quickly launched a bombing campaign to reinstate Mr Hadi, fearing the encroachment of Iran’s influence on its borders.

Little progress towards peace has been made until this week.

Attempts to hold talks were scuppered in September when the Houthis refused to attend unless their wounded were treated outside of Yemen, a request refused by the other side.

However, 50 injured Houthi fighters were finally permitted to fly to Oman on Monday for treatment in a goodwill gesture which paved the way for the talks.

Children suffering from acute malnutrition in Yemen Show all 17 1 /17 Children suffering from acute malnutrition in Yemen Children suffering from acute malnutrition in Yemen Doctors take some blood of Yemeni Yousef Abdullah Bakhit Ali, 13, suffering from severe acute malnutrition. With ongoing and unending conflict in Yemen, humanitarian situation continues to deteriorate across the country Unicef/Huwais Children suffering from acute malnutrition in Yemen A doctor weighs Yemeni baby Yahya Hamoud Ali Al Huzef, 9 months suffering from malnutrition Unicef/Huwais Children suffering from acute malnutrition in Yemen Ali Mohammed Ahmed Jamal,12 years old and suffering from severe acute malnutrition. He arrives with his family at a Unicef supported treatment centre in a hospital in Sanaa Unicef/Huwais Children suffering from acute malnutrition in Yemen A doctor measures the arm of Yemeni Ali Mohammed Ahmed Jamal, 12, who is suffering from malnutrition at a treatment centre in a hospital in Sanaa Unicef/Huwais Children suffering from acute malnutrition in Yemen There are over 400,000 severely malnourished children in need urgent lifesaving assistance in Yemen Unicef/Abdulhaleem Children suffering from acute malnutrition in Yemen Ali Mohammed Ahmed Jamal is weighed Unicef/Huwais Children suffering from acute malnutrition in Yemen A doctor measures the arm of baby Yahya Hamoud Ali Al Huzef Unicef/Huwais Children suffering from acute malnutrition in Yemen Unicef are currently working to reach 275,000 malnourished children with critical life-saving supplies and care for over 5 million people with safe and clean water to stop the spread of life-threatening diseases Unicef/Huwais Children suffering from acute malnutrition in Yemen Yahya Hamoud Ali Al Huzef with his family in his house in the outskirts of the capital Sanaa Unicef/Huwais Children suffering from acute malnutrition in Yemen The country is on the brink of famine and children's chances of survival are becoming slimmer by the day Unicef/Abdulhaleem Children suffering from acute malnutrition in Yemen Ali Mohammed Ahmed Jamal has his arm measured Unicef/Huwais Children suffering from acute malnutrition in Yemen Unicef are currently working to provide nearly 1 million children with vaccines and healthcare Unicef/Huwais Children suffering from acute malnutrition in Yemen Doctors take some blood of Yemeni Yousef Abdullah Bakhit Ali, 13 years old suffering from severe acute malnutrition at a treatment centre in a hospital in the capital Sanaa on November 2, 2018. (Release obtained) With ongoing and unending conflict in Yemen, humanitarian situation continues to deteriorate across the country. There are over 400,000 severely malnourished children in need urgent lifesaving assistance in Yemen. The country is on the brink of famine and childrenâ€™s chances of survival are becoming slimmer by the day. UNICEF are working with partners around-the clock to save children suffering from malnutrition and disease. We are currently working to reach: â€¢ 275,000 malnourished children with critical life-saving supplies and care â€¢ Over 5 million people with safe and clean water to stop the spread of life-threatening diseases â€¢ Nearly 1 million children with vaccines and healthcare â€¢ 9 million people with emergency cash assistance to help families buy basic commodities so they can survive Â© UNICEF/UN0253367/ Huwais Unicef/Huwais Children suffering from acute malnutrition in Yemen Unicef are working with partners around-the clock to save children suffering from malnutrition and disease Unicef/Abdulhaleem Children suffering from acute malnutrition in Yemen Unicef are currently working to provide 9 million people with emergency cash assistance to help families buy basic commodities so they can survive Unicef/Huwais Children suffering from acute malnutrition in Yemen Ali Mohammed Ahmed Jamal is suffering from malnutrition Unicef Children suffering from acute malnutrition in Yemen On 31 October 2018 in Yemen, the Al Thawra Hospital in Hodeidah where children are being treated for severe acute malnutrition. UNICEF Regional Director for Middle East and North Africa Geert Cappelaere visited Yemen from 29 October through 1 November 2018. As of 30 October 2018, over 11 million children â€“ 80 per cent of all children in the country â€“ require humanitarian assistance, due to the impact of the ongoing conflict. Worsening years of underdevelopment, attacks against civilians and civilian infrastructure and lack of salary payments for most civil servants have pushed basic services for children to the brink. Children face food shortages, disease, displacement and an acute lack of access to basic social services. One out of three children in Yemen is at risk of acute malnutrition. Â© UNICEF/UN0253574/Abdulhaleem Unicef/Abdulhaleem

The United Arab Emirates, which is a key backer of the recognised government, said the planned talks offered a “critical opportunity” to end nearly four years of devastating war.

Rebel spokesperson Mohammed Abdelsalam, meanwhile, confirmed the rebel delegation’s departure from Sana’a on Twitter, saying the Houthis “will spare no effort to make a success of the talks to restore peace and end the aggression”.

British foreign secretary Jeremy Hunt said he believed the “mood has changed” and said attendance for the talks looked “positive”.

He added: “What’s bedevilled these talks to date is that both sides have thought that a military victory is possible, but this is the first time for two years that the parties have come round a table together and I do think the mood has changed, so I think we want to do everything we can to support it.”

I do think the mood has changed, so I think we want to do everything we can to support it Jeremy Hunt, Foreign Secretary

The UN’s humanitarian aid chief Mark Lowcock, however, was more cautious, saying he didn’t expect “easy or rapid process” in the talks.

Mr Lowcock, who is head of the Office for the Coordination of Humanitarian Affairs, said the “onus” in the peace talks is on Yemen’s government and the Houthi rebels to “take this seriously and act in a responsible way”.

He added that around 24 million people in Yemen – roughly 75 per cent of the population – will need humanitarian assistance in 2019.

David Miliband, president of the International Rescue Committee, urged the US and Britain to use their influence as military supporters of the Saudi-led coalition to “encourage meaningful dialogue in these talks”.