Yemeni political rivals including Shiite rebels who have swept through the capital signed a peace accord Sunday in the presence of the UN envoy, the official Saba news agency said.

“A national peace and partnership agreement based on the outcomes of the national dialogue conference was signed this evening at the presidential palace” in Sanaa, Saba reported. President Abdrabuh Mansur Hadi, UN envoy Jamal Benomar and representatives of Yemen’s political forces, including the Huthi rebels, attended the signing ceremony, the agency reported.

Shi’ite Houthi rebels and government forces fought for a fourth straight day in the Yemeni capital, residents said, despite the announcement of a U.N.-brokered peace agreement due to be signed later on Sunday.

Residents reported heavy fighting since Saturday night in an area of the capital near the headquarters of the First Armoured Division, which is loyal to an army general viewed by the Houthis as linked to hardline Sunni Islamists hostile to them.

One resident in the area said he had counted at least 10 bodies — six Houthi fighters and four uniformed soldiers — killed in the fighting.

The fighting, which escalated last Thursday after weeks of protests and clashes, appeared to be the biggest challenge yet to a U.N.-backed transition to democracy launched after veteran Yemeni ruler Ali Abdullah Saleh was forced to step down in 2012.

U.N. special envoy Jamal Benomar, who held talks with Houthi leader Abdulmalek al-Houthi in his home province of Saada on Wednesday and Thursday, announced late on Saturday that an agreement had been reached and was to be signed on Sunday.

The accord calls for the creation of a new national unity government which will bring in the Houthis and reverse much of an unpopular decision made in July to increase fuel prices as part of an economic overhaul intended to cut the budget deficit.

Yemeni officials said al-Houthi’s representatives would fly to Sanaa later in the day to sign the deal at a ceremony expected to be attended by President Abd-Rabbu Mansour Hadi. Hadi said he supported the deal despite the continued fighting.

One Houthi rebel leader told Reuters late on Saturday his group had stepped up its shelling of government forces and had driven soldiers out.

“We controlled a military unit east of the First Armoured Division .... and we continued heavy shelling of the division headquarters and the nearby Iman university in all directions,” Ali al-Emad said.

Students and security guards at the university run by Abdel-Majeed al-Zindani, a prominent cleric who is on a U.S. terrorism blacklist, were later forced to quit the campus due to the Houthi attacks, a university official told Reuters on Sunday.

Al Jazeera television reported sounds of two explosions to the north of the capital towards dawn.

Fighting raged throughout Saturday on the outskirts of Sanaa and the rebels said they had taken control of the headquarters of state television, though broadcasting continued from a different location.

Yemen’s Higher Security Committee announced a curfew in four areas of the capital from 9 p.m. until 6 a.m. and schools have been shut until further notice.

Insecurity and political turmoil have grown since Saleh was ousted by Arab Spring protests. The Houthi insurrection is one of several threats to the stability of Yemen, which borders oil exporter Saudi Arabia and is struggling with a secessionist movement in the south and a spreading al Qaeda insurgency.

The Houthis have been struggling for a decade against the Sunni-dominated government for more territory and autonomy in the north.

In recent weeks, Houthi protesters have blocked the main road to Sanaa’s airport and have staged sit-ins at ministries. They have called for the government to step down and for the restoration of subsidies cut by the state in July as part of its economic reform programme. (Reporting By Mohammed Ghobari; Writing By Maha El Dahan and Sami Aboudi; Editing by Gareth Jones)