SANAA, Yemen — Yemeni government officials and Shiite rebels signed a peace agreement on Sunday following days of violence that left more than 140 people dead and sent thousands fleeing their homes, state media said, although major rebel advances earlier in the day deepened a sense of uncertainty in the country.
The agreement calls for an immediate cease-fire and the formation of a technocratic government within a month after consultations with all political parties, a U.N. envoy said later at a joint news conference with President Abed Rabbo Mansour Hadi in the capital, Sanaa.
"The head of the government may not belong to any political group," Jamal Benomer said, reading from the document, which, he added, also calls for security forces to be restructured based on consultations with the political parties.
Just hours earlier, state media reported that the country's prime minister had resigned, but the president's office denied it had received any such request.
The conflicting information came as the rebels, called Hawthis, seized numerous strategically important installations in Sanaa, including the Defense Ministry, the Central Bank, a key military base and Iman University, military and security officials said. An official at the Defense Ministry later said that the situation there was "normal and stable" and that the building had not been attacked.
The Hawthis have in recent months routed their Islamist foes in a series of battles north of Sanaa, and in recent days consolidated and expanded their grip on areas just to the north of the capital.
Their foes have traditionally been Sunni Islamist militias allied with the government or the fundamentalist Islah party. The Hawthis have been pressing for a change of government and what they see as a fair share of power.
In many cases, officials said the rebels handed over installations they captured to the military police or to popular committees comprising Hawthis and local residents to protect them against looting.
However, they dealt harshly with personnel and installations associated with their foes in years of war, such as the university, which was seen as a bastion of Sunni hard-liners and a recruitment hub for militants.
On Sunday afternoon, the official SABA news agency announced the resignation of Mohammed Salem Bassindwa but gave no details. A subsequent report by the agency quoted the president's office as saying it had not received any such request.
Bassindwa took office shortly after former President Ali Abdullah Saleh was forced to step down. He has been in office since February 2012 and has been sharply criticized for his inability to deal with the country's pressing problems.
The military base captured by the Hawthis is the headquarters of the army's 1st Armored Division, an elite outfit led by Maj. Gen. Ali Mohsen al-Ahmar, who has led several military campaigns against the Hawthis in the north.
The officials spoke on condition of anonymity because they weren't authorized to brief reporters. There were no official casualty figures from Sunday's violence.
Hawthi rebels captured the state television building on Saturday.
Interior Minister Hussein al-Terb issued a statement Sunday calling on policemen in the capital to "cooperate" with the Hawthis in maintaining security, a move seen as an attempt to stop the city from descending into lawlessness.
The Defense Ministry and the General Staff earlier in the day called on military units in Sanaa and nearby areas to remain at their posts, be on high alert and safeguard their weapons and equipment.
The Hawthis waged a six-year insurgency that officially ended in 2010. The following year, an Arab Spring-inspired uprising shook the country, eventually forcing Saleh to step down in 2012 as part of a U.S.-backed deal giving him immunity from prosecution.
Yemen, one of the Arab world's poorest nations, is facing multiple challenges. In addition to the Hawthi rebels, an al-Qaida branch in the south poses a constant threat as it tries to impose control over cities and towns.
The U.S. considers Yemen's local branch of al-Qaida to be the world's most dangerous, and has helped support Yemeni government offensives against it with drone strikes.
On Saturday, the U.N. envoy to Yemen, Jamal Benomar, had signaled that an agreement was reached to halt the violence, and that preparations were underway to sign the accord.
Associated Press reporter Merrit Kennedy in Cairo contributed to this report.