Yemeni's embattled president Abde Rabbu Mansour Hadi has stepped down following a mass resignation of his government, amid a standoff with Shiite Houthi rebels who control the capital Sanaa.

Prime Minister Khaled Mahfoudh Abdullah Bahah said in a statement that ministers of the government "choose to distance ourselves from such destructive political chaos which is not based on either law or logical systems".

He referred to the tentative deal reached between the president and the rebels, who agreed to release Hadi's chief of staff and withdraw their militias if the government agrees to a rewriting parts of the constitution.

"We are not responsible for the actions of others, in front of God and in front of the Yemeni people," the statement reads. Bahah's government was formed in November as part of a UN-brokered peace deal after the Houthis previously conquered the capital.

Bahah also posted his resignation on Facebook, adding that he stood down in order to ""avoid being dragged into an abyss of unconstructive policies based on no law."

"We don't want to be a party to what is happening or will happen," he added.

The latest move came after the Shiite Houthis took over the presidential palace in Sanaa. One government minister called it the "completion of a coup".