By Sherine Tadros, Middle East Correspondent
The President of Yemen - a key ally in the West's fight against al Qaeda - has resigned amid a stand-off with a rebel militia in the capital, according to an official.
Abd-Rabbu Mansour Hadi quit minutes after the country's prime minister offered his cabinet's resignation - leaving Yemen with no legitimate authority and sinking deeper into crisis and uncertainty.
The capital Sana'a has endured a violent and tumultuous week after Shia rebels - known as the Houthis - kidnapped the president's chief of staff and then stormed the presidential palace.
There was hope on Wednesday that a deal between the President and the rebels could calm tensions, but those were dashed by the resignations.
Houthi rebels began taking control of parts of the country last year.
Last September they moved into the capital but crucially decided to leave the presidential palace and government buildings untouched.
In a letter to the Parliament, Mr Hadi apologised to the Yemeni people but said he had no choice after the political situation reached deadlock.
Yemeni analysts say the resignation was inevitable as the President had no power and for months had been ruling in name only.
The rebels were refusing to yield to Mr Hadi's demands to release his chief of staff and withdraw their militias from the around his residence.
His resignation was perhaps the last hand he had to play in the negotiations - so how the Houthis respond and whether they give in to his demands in order to avoid a complete breakdown is the big question.
One Houthi leader has already proposed setting up a presidential council.
Yemen's future has perhaps never been so uncertain, and with nobody in charge the power vacuum could well bring more violence and the country could split as the various tribes and groups take control of different parts of the country.
There is already a long-standing secessionist movement in the south.
The President's resignation will also sound alarm bells through the region and the US.
Mr Hadi was a key US ally and part of the American counter-terrorism strategy.
Al Qaeda's branch in Yemen - known as al Qaeda in the Arabian Peninsula - has benefited from the recent chaos in the country and intelligence officials say it now poses a serious threat to the West.
The group recently claimed responsibility for the Charlie Hebdo attacks in Paris.
Losing such an important ally at this time will certainly worry the Americans and most likely prompt a reassessment of their strategy.
One other important player in Yemen right now is the former president Ali Abdullah Saleh who, despite launching six wars against the Houthis while in power, has allied with the rebels in recent months against Mr Hadi.
He may seek to get involved in the political process, which would anger his opponents and Mr Hadi's supporters.
The days ahead may well prove decisive for Yemen's future and have repercussions far beyond its borders.