When veteran diplomat Mohamed Abdullahi Mohamed was elected president of Somalia in February 2017, supporters hoped he would provide stability in a failed state notorious for corruption and extremism.

But less than four years later, Somalia was plunged into a political crisis when the president extended his mandate without holding elections.

He is now locked in an escalating standoff with Prime Minister Mohamed Hussein Roble, who accuses him of an "attempted coup."

Here are portraits of the two rivals:

The 59-year-old president is popularly known as Farmajo, a name derived from the Italian word for cheese, although it is unclear why he earned this nickname.

He spent several years studying and working in the United States but gave up his American citizenship in 2019.

Farmajo was elected president by MPs in a converted aircraft hangar after a six-month voting process marred by widespread allegations of vote-buying and corruption.

The father of four inherited a deeply unstable nation where Al-Shabaab jihadists still hold swathes of countryside despite being routed from the capital Mogadishu in 2011.

"This is the beginning of unity for the Somali nation, the beginning of the fight against Shabaab and corruption," a triumphant Farmajo said.

Born in Mogadishu to activist parents from the Darod clan, the politically savvy Farmajo was welcomed by many Somalis who wanted change after a series of Hawiye presidents in a country where clan divisions dominate politics.

He himself had served as prime minister for a brief stint in 2010-11 when he notably implemented the first monthly stipends for soldiers and established an anti-corruption commission.

In 2011, after months of infighting over the staging of a presidential election, a deal was struck to postpone the vote in exchange for Farmajo's resignation.

He agreed to step down as premier in "the interest of the Somali people."

The following year Farmajo and members of his former cabinet set up the Tayo (Quality) party, but after he made an unsuccessful run for the presidency he stepped back from politics for several years.

Bustup: President Mohamed Abdullahi Mohamed, left, and Prime Minister Mohamed Hussein Roble
Bustup: President Mohamed Abdullahi Mohamed, left, and Prime Minister Mohamed Hussein Roble AFP / Yasuyoshi CHIBA

As president since 2017, he has adopted a strong nationalist stance, and at one stage broke off diplomatic ties with Kenya -- an approach that earned him support from some Somalis, although he has also made plenty of enemies.

A supporter of a strong central state, Farmajo has been accused of meddling in several state elections by attempting to place his allies in power there.

In April 2021, parliament extended Farmajo's term after a failure to agree on terms for new elections, setting off an unprecedented constitutional crisis and street battles in Mogadishu.

One rival described him as a "dictator" who wanted to stay in power by force.

Mohamed Hussein Roble won the unanimous approval of parliament in 2020 to become premier despite being a political neophyte, and has won over even the opposition with his even-keeled approach to organising the long-delayed elections.

While lacking the oratory skills of his predecessor Hassan Ali Khaire, the Swedish-trained civil engineer is seen by many as a straight talker who understands Somalia's complex makeup and is ready to discuss issues openly.

The 58-year-old technocrat, who had worked at the UN's International Labour Organization (ILO) in Nairobi, initially took a back seat to Farmajo.

But the two men increasingly clashed as the premier took on a more high-profile role and challenged his boss on several key issues.

After the crisis over the delayed polls descended into violence this year, he vowed to lead the country into "just, free, fair and transparent elections".

"I have no personal interest in this election and I have no one to be allied to -- all I am working for is justice for all," was his lofty declaration in June.

He has accused Farmajo of seeking to sabotage the vote, after the president withdrew his mandate to organise elections and announced his suspension on Monday.

Roble appears to have some allies among Somalia's political opposition and the international community, with the Africa Bureau of the US State Department declaring its support for his "efforts for rapid & credible elections."

People who know Roble describe him as a man of simple tastes but who likes doing things his own way.

But some say his lack of experience and tendency to hasty decisions could make him vulnerable to exploitation by more powerful players.