Somali MPs have voted to start impeachment proceedings against President Abdullahi Yusuf, accusing him of being a “stumbling block to peace”.
He must now appear before parliament to defend himself. The motion would need a two-thirds majority to succeed.
The move in Baidoa comes a day after the president named a new prime minister in defiance of parliament.
It also prompted neighbouring Kenya to announce sanctions against the Somali president and his associates.
According to the Somali parliament’s motion, President Yusuf stands accused of being a stumbling block to peace; of behaving like a dictator and of failing to push the peace process forward after four years as president.
He is also charged with side-lining some of the communities.
The BBC’s Peter Greste in the Kenyan capital, Nairobi, says this is coded language referring to the increasingly bitter clan rivalries that have deepened under his leadership.
President Yusuf’s biggest miscalculation appears to have been a decision to sack Prime Minister Nur Hassan Hussein and his cabinet on Sunday, for “failing to deliver peace”, he says.
President Yusuf and Mr Nur had clashed in recent months over attempts to deal with the Islamist-led armed opposition.
Our reporter says the government badly needs a unified front if it is to find peace with Islamist insurgents who now control almost all of southern Somalia.
The Ethiopian troops, which helped government forces drive Islamist forces from Mogadishu two years ago, are due to pull out in just over two weeks.
A small African Union peacekeeping force has indicated it may leave with the Ethiopians unless it gets reinforcements.
About one million people have fled their homes – many after fierce fighting in Mogadishu between Islamists and the Ethiopia-backed government forces.
Somalia has not had a functioning national government since President Mohamed Siad Barre was overthrown in 1991.