SANAA - Yemeni leader Abdrabuh Mansur Hadi offered to resign on Thursday amid a standoff with a powerful Shiite militia in control of the capital, throwing his country deeper into political turmoil.
Presidential adviser Sultan al-Atwani and several other aides confirmed that Hadi had quit, but a senior official said Yemen's parliament had rejected his resignation.
"Parliament... refused to accept the president's resignation and decided to call an extraordinary session for Friday morning," the official said, speaking on condition of anonymity.
Yemeni Prime Minister Khalid Bahah also resigned, saying he did want to be part of the collapse of the country.
The shock announcements came after the militia, known as Huthis, tightened their grip on Sanaa this week after seizing almost full control of the capital in September.
They had maintained fighters around key buildings on Thursday and continued holding a top presidential aide they kidnapped on Saturday, despite a deal to end what authorities called a coup attempt.
The potential fall of Hadi's Western-backed government will raise serious concerns of strategically important but impoverished Yemen collapsing into complete chaos.
After heavy fighting between government forces and the Huthis this week that killed at least 35 people, the UN Security Council and Yemen's Gulf neighbours had all voiced support for Hadi's continued rule.
The Huthis swept into Sanaa last year from their stronghold in the far north, demanding a greater say in the country's affairs, and refused to abandon the capital despite a UN-negotiated deal.
The situation escalated on Saturday when the militiamen seized top presidential aide Ahmed Awad bin Mubarak in an apparent bid to extract changes to a draft constitution, which the Huthis oppose because it would divide Yemen into six federal regions.
The militiamen say it would split the country into rich and poor areas.
'Pray to protect Yemen
In the ensuing days pitched battles erupted, with the Huthis eventually seizing Hadi's offices in the presidential palace, attacking his residence and surrounding the home of the prime minister Bahah.
In his letter of resignation, seen by AFP, Bahah said that from the time of his nomination in November and his confirmation by parliament in December he had tried to serve the country.
"But the situation has evolved in a different manner and we decided to stay away from unconstructive policies that do not respect the rule of law," Bahah said.
"We do not want to be a party to what is happening and what is about to happen," he said, adding that the government refused "to take responsibility for the actions of others".
He also offered his "apologies to the patient people of Yemen" and said: "We pray to Allah to protect Yemen."
There had been hope the crisis would be resolved after the nine-point deal was struck late on Wednesday.
In return for concessions over the disputed draft constitution, the Huthis agreed to vacate the presidential palace, free Mubarak, withdraw from areas surrounding the residences of Hadi and Bahah, and abandon checkpoints across the capital.
But during the day Thursday, officials said they were not yet honouring the deal.
The UN envoy to Yemen, Moroccan diplomat Jamal Benomar, had arrived in the country on Thursday for talks with the political rivals, but they were swiftly overtaken by the flurry of resignations.
Yemen has been riven by instability since an uprising forced strongman Ali Abdullah Saleh from power in 2012.
Saleh has been accused of backing the Huthis -- who are from the same Zaidi sect of Shiite Islam as the ex-leader -- as has Shiite-dominated Iran.
The turmoil has raised fears that Yemen, which neighbours oil giant Saudi Arabia and lies on the key shipping route from the Suez Canal to the Gulf, may become a failed state similar to Somalia.
Since overrunning the capital, the Huthis have pushed farther south and east, meeting fierce resistance by Al-Qaeda and Sunni tribal fighters.
Yemen's branch of the jihadist network, Al-Qaeda in the Arabian Peninsula, is considered its most dangerous and claimed responsibility for this month's deadly attack on French satirical weekly Charlie Hebdo.
Yemen has allowed the United States to carry out repeated drone attacks on Al-Qaeda militants in its territory.
The Huthis have long complained of marginalisation and fought six wars with the government between 2004 and February 2010.
Yemen thrown into turmoil as president resigns