A Saudi-brokered agreement has been reached between the warring sides in the south of Yemen, paving the way for wider peace talks to end the five-year civil war.

The Southern Transitional Council, backed by the United Arab Emirates, in August seized control of the southern port city of Aden, leaving the Saudi- and UN-backed government led by President Abd Rabbu Mansour Hadi in possession of little land or effective power. Hadi had already been thrown out of Yemen’s capital, Sana’a, in 2014 by Iranian-backed Houthi rebels.

The split in the south between Hadi and the STC pitted two normal Gulf allies – the UAE and Saudi Arabia – against one another.

The newly negotiated government will involve a 24-member government with an equal number of ministries allocated to the STC and Hadi supporters.

The deal is a significant enhancement of the status of the STC, which has previously been excluded from all UN-brokered peace deals, and STC sources appeared to be more pleased with the agreement than the other side.

The STC move against Aden in August came after the UAE announced it was pulling most of its troops out of Yemen, leaving Saudi Arabia exposed as the main interventionist regional power.

The STC, which is opposed to the influence of the Muslim Brotherhood-aligned party al-Islah in Hadi’s government, said it had discovered rampant corruption once it took over military posts in August.

The new agreement, negotiated in Jeddah and Riyadh over more than a month, includes new measures to crack down on corruption and ensure a more even allocation of resources by Yemen’s central bank. The draft agreement postpones the secession issue until the war with the Houthis has been resolved.

The STC supports Yemen splitting in two as it was before 1990, and is arguably less committed to the battle to throw the Houthis out of Sana’a, including its bases from which it mounts air raids over the border into Saudi Arabia.

The UN special envoy for Yemen, Martin Griffiths, had thought he would be able to announce the agreement between Hadi and the STC last week, but a last-minute dispute over the allocation of resources held back the deal.

Griffiths was in Riyadh on Thursday for talks with the Saudi deputy defence minister, Prince Khalid bin Salman.

In preparation for the agreement Saudi forces have already moved into Aden and key military bases, replacing departing UAE troops.

The Houthis in September offered a ceasefire with Saudi Arabia, ending their increasingly effective drone and cruise missile attacks into Saudi territory. An extensive prisoner swap programme has been agreed, but the UN is pressing the Saudis to do more to reciprocate.

In a further sign of slow diplomatic progress, four joint observation posts have been established to monitor the ceasefire at the Red Sea port of Hodeida, for many years the flashpoint of conflict between the Houthis and Hadi forces.