Somalia's President Mohamed Farmaajo said his decision to clip the powers of his Prime Minister Hussein Roble was to protect the electoral calendar from being derailed by their differences.
But their power struggle is also a depiction of the shortcomings in Somalia's provisional constitution.
Last week on Thursday, President Farmaajo decreed the suspension of the powers of the prime minister as head of government -- powers to fire, appoint or suspend officials including members of the Cabinet, until after elections.
A statement from Villa Somalia, the president's official residence, said PM Roble's actions were "deviating" from the election process and security, infringed on the welfare of the armed forces, misused authority and "operated without consultation" in decisions that violated the constitution.
The power struggle is over how to conduct the investigation into the alleged kidnap and murder of Ikran Tahlil, a government spy agent. PM Roble opted for a military court, which President Farmaajo overruled and appointed a five-member committee. The spat has since moved to elections and politics.
The 2012 provisional Constitution is unclear on the actual separation of powers between the PM and the president.
Article 90 lists responsibilities and powers of the federal president as including the appointing and dismissing of ministers, state ministers and deputy ministers, on recommendation of the prime minister. The president's powers do not include firing the prime minister whose tenure is determined by parliament.
The president cited this when he voided PM Roble's changes in the Council of Ministers and the suspension of former head of National Intelligence Security Agency Fahad Yasin over the Tahlil case.
Mr Yasin later resigned in the wake of public outrage. President Farmaajo appointed him a security advisor. Last week on Thursday night, PM Roble issued a statement rejecting the presidential decree clipping his powers, saying he will ignore them and lead the government as usual. He argued that Article 100 of the Provisional Constitution gave him powers to appoint and remove ministers but doesn't say whether he needs approval from the president.
Some observers told The EastAfrican that the two leaders were victims of the absence of clarity in law, or at least a court dedicated to hear constitutional questions.