BAIDOA, Somalia (CNN) -- Somalia's parliament backed Prime Minister Nur Hassan Hussein Monday in his power struggle with President Abdulahi Yusuf, who announced Sunday he had sacked the prime minister.
President Abdulahi Yusuf said he was firing Nur Hassan Hussein on Sunday.
Hussein won the backing of 143 lawmakers in a confidence vote -- the overwhelming majority of the 166 members of parliament who showed up for the highly charged session.
Yusuf said Sunday he was firing Hussein, a former Red Crescent official who has been in office for 13 months. But, later in the day, Hussein said the president had "no power to dismiss" him.
The crisis is just the latest one to strike the impoverished Horn of Africa nation.
Somalia has been without an effective central government for nearly two decades and has become a haven for pirates who seize ships for ransom in the Gulf of Aden and Indian Ocean.
Somalia's government, backed by Ethiopian forces, also continues to battle Islamic militias with the fighting concentrated in the capital, Mogadishu.
Ethiopian forces have refused to withdraw, as required under a recent cease-fire deal, while heavy fighting across Somalia has driven more than a million people from their homes.
Somalia has had a United Nations-backed transitional government -- now based in the town of Baidoa -- since the Ethiopian troops expelled Islamist forces from Mogadishu in December 2006.