Somalia’s President Mohamed Abdullahi Farmajo has cut some of the prime minister’s powers as a bitter rift between the two men intensifies.
He accused Mohamed Hussein Roble of “taking reckless steps that could lead to a political and security crisis”.
But Mr. Roble said he would not abide by the order, calling it unconstitutional.
The dispute, fuelled by the mysterious disappearance of a female spy, raises fears of armed conflict on the streets of the capital between rival forces.
Ikran Tahlil, 25, who was last seen at the end of June, leaving home in an official vehicle.
The government said Ms Tahlil had been kidnapped and killed by al-Shabab, an al-Qaeda affiliate which has been waging a brutal insurgency in Somalia and still controls many rural areas of the country.
However, al-Shabab denied the allegation. It normally says when it has killed government agents.
The prime minister subsequently suspended the head of the intelligence agency, Fahad Yasin, accusing him of defying his order to report, within 48 hours, on what had happened to the spy.
But the president intervened, saying the prime minister had no authority to sack Mr. Yasin – and reinstated him.
The president also rejected the prime minister’s decision to sack the security minister.
The president has appointed a commission of inquiry to look into the disappearance of Ms. Tahlil, but the spy’s mother, Qali Mohamud, dismissed the move, saying she wanted a military court to investigate.
On Thursday, the president’s office said in a statement the prime minister’s powers – especially over the appointment and dismissal of officials – had been withdrawn until Somalia held elections.
The Horn of Africa nation is scheduled to hold indirect parliamentary elections between 1 October and 25 November.
Hours later, Mr Roble said he would reject the “unlawful” decision. “The prime minister reminds the president to preserve the principles of the constitution of the separation of powers of the government’s institutions,” he said in a statement.