NAIROBI, Kenya — During his years as an administrator at the Department of Transportation in upstate New York, the Somali refugee turned American citizen took classes in political science, imbibing democratic values he hoped to one day export back to his homeland.
That dream came true for Mohamed Abdullahi Mohamed in 2017, when he returned to Somalia and was elected president in a surprise victory that evinced high hopes he might reform — even transform — his dysfunctional, war-weary country.
But those aspirations have crumbled since Mr. Mohamed failed to hold elections when his four-year term ended in February, then moved to extend his rule by two years — a step many Somalis viewed as a naked power grab.
A furious political dispute turned violent on Sunday when a series of gunfights broke out between rival military factions in the capital, Mogadishu, evoking fears that Somalia, after years of modest yet gradual progress, could descend into the kind of clan-based bloodshed that ripped it apart in the 1990s.
Now Mr. Mohamed’s democratic credentials lie in tatters and he is in an open confrontation with his former ally, the United States, where he still has a family home. Secretary of State Antony J. Blinken has publicly threatened to sanction Mr. Mohamed and other Somali officials, and this week American officials reiterated calls for Somalia to hold elections immediately.
“His entire brain power is focused on his ascendancy, and how he can dominate the scene,” said Abdirashid Hashi, a former cabinet minister under Mr. Mohamed. “His brinkmanship allowed him to get away with a lot. But now all those tactical moves have culminated in the fiasco we are in.”
In an effort to defuse the crisis, Mr. Mohamed agreed to attend Parliament on Saturday. But the capital is on a knife edge, and the stakes are at their highest in years, according to Somali leaders and Western officials. At risk are billions of dollars in aid programs and debt relief, the hopes of young Somalis determined to find a better future and progress in the fight against insurgents with Al Shabab, one of the world’s best organized and funded Al Qaeda affiliates.
Mr. Mohamed did not respond to a request for an interview or to questions sent to his aides.
Popularly known as “Farmaajo” — a derivation of the Italian word for cheese and purportedly his father’s favorite food — Mr. Mohamed was once the bearer of many Somalis’ hopes.
Celebratory gunfire erupted across Mogadishu in 2017 following his unexpected election victory, and he quickly gathered support across the political and clan spectrum from Somalis who supported his promises of an anti-graft, anti-Shabab crusade. “The first months were amazing,” said Col. Ahmed Abdullahi Sheikh, then the commander of Danab, an elite American-trained commando unit. “I thought I’d met my hero.”
American officials were also impressed. Although at least five American passport holders ran for the presidency that year, Mr. Mohamed was widely seen as less corrupt, more reform-oriented and less manipulated by foreign interests than the other 24 candidates.
“This is the beginning of unity for the Somali nation,” Mr. Mohamed told supporters shortly after winning the election.
Mr. Mohamed came to the United States in 1985 as a junior diplomat at the Somali Embassy and, as his country tumbled into conflict, decided to stay. A family friend said he first applied for political asylum in Canada, where his mother and siblings lived, and later obtained a Canadian passport.
But in the early 1990s, Mr. Mohamed, newly married, moved back to the United States where his family eventually settled in Grand Island, next to Buffalo and Niagara Falls.
He studied history at the University at Buffalo, became an American citizen, campaigned for a Republican candidate in county elections, and in 2002, got a job at the New York Department of Transportation.
An episode from that period of Mr. Mohamed’s life offered a hint of the political style that has brought Somalia to a dangerous junction.
Several Somali-American leaders said that in 2007, a bitter dispute erupted inside a Somali community group that Mr. Mohamed led in Buffalo. His two-year term was coming to an end, but some members accused him of trying to cling to power by manipulating the electoral process, they said.
The Somali-Americans, who spoke on the condition of anonymity to protect their connections to the president’s family, said the dispute ended with the community group splitting in two.
Mr. Mohamed broke into Somali politics in 2010 when he so impressed the president of Somalia, Sharif Sheikh Ahmed, on a visit to New York that Mr. Sharif made him prime minister.
But Mr. Mohamed lasted only eight months in the job, forced out by Somali political machinations, and he was soon back at his desk at the Department of Transportation in Buffalo, where he enforced nondiscrimination and affirmative action policies.
The great hopes many Somalis invested in Mr. Mohamed in 2017, when he won the presidency against all expectations, stemmed partly from his public image as a calm and bespectacled, if somewhat uncharismatic, technocrat. But disappointment soon set in.
Mr. Mohamed played divisive clan politics and began to feud openly with the country’s regional leaders, undermining the power-sharing system that underpins Somali stability.
In late 2018, he arrested a potential rival, sparking protests in which at least 15 people were killed, and weeks later expelled the United Nations envoy, accusing him of meddling in Somali affairs.
Mr. Mohamed came to rely heavily on his powerful spy chief, Fahad Yasin, whose security services detained and tortured independent journalists, according to human rights groups, United Nations and Western officials.
Mr. Yasin, a former journalist with Al Jazeera, had become a conduit for unofficial Qatari funds that were used to help get Mr. Mohamed elected, and which he used to solidify his political base while in power, the officials said — part of a wider proxy battle for influence between rival oil-wealthy Persian Gulf states in the strategically located country.
Some in Mr. Mohamed’s inner circle, including Colonel Sheikh, grew disillusioned and quit. “I said to myself: ‘These people are bad news,’” he said.
In 2019, Mr. Mohamed gave up his American citizenship. He didn’t explain the decision, but officials familiar with the matter pointed to one possible factor.
At the time Mr. Mohamed surrendered his passport, his finances had come under investigation by the Internal Revenue Service in the United States, said three Western officials familiar with the matter, speaking on the condition of anonymity to discuss a sensitive matter about a foreign head of state.
Mr. Mohamed’s office did not respond to questions about an I.R.S. audit.
As Mr. Mohamed contemplates his next move, his former American allies say he needs to act quickly.
“It is time for President Farmaajo to step up and do what’s best for his country,” Robert F. Godec, the acting assistant secretary of state for African affairs, wrote in an email to the Times on Thursday. “Elections need to be held immediately.”
In interviews, several Somali politicians said the mess was also Washington’s fault, blaming the United States for failing to intervene with Mr. Mohamed when his authoritarian tendencies became evident several years ago.
Responding to the criticism, a State Department spokesperson said the United States had “repeatedly and consistently urged President Farmaajo to engage constructively with Federal Member State leaders to advance political reconciliation and reach consensus on issues vital to Somalia’s stability.”
Mr. Mohamed’s achievements as president include a major debt relief deal in 2020 that canceled at least $1.4 billion of the country’s arrears. He also stoked nationalist passions by cutting ties with neighboring Kenya in December as part of a long-running diplomatic dispute.
His tough stance is popular among ordinary Somalis weary of foreign interference.
“The president is working for the interests of Somalia,” said Abdihakim Ali, 43, speaking by phone from the southern city of Kismayo. “The foreigners don’t want that.”
Yet Mr. Mohamed also relies heavily on other regional powers — continuing to receive funding from Qatar and allying with the autocratic president of Eritrea, Isaias Afwerki, whose military has trained thousands of Somali troops, Western and Somali officials say.
“It comes as cash and it’s uncounted,” Abdirizak Mohamed, a former interior minister and now opposition lawmaker, said of the Qatari funds. “It’s an open secret.”
Now Mr. Mohamed is confined to Villa Somalia, the presidential compound in central Mogadishu, as military units loyal to his most powerful opponents — a coalition of presidential candidates and the leaders of two of Somalia’s five regional states — camp on a major junction a few hundred yards away.
Worried residents say they don’t know whether the president’s latest concession will offer a genuine opportunity for new talks, or a pause before rival fighters open fire again.
“I feel a lot of fear,” said Zahra Qorane Omar, a community organizer, by phone from Mogadishu. “We’ve gone through enough suffering. The bullet is not what this city or its people deserve.”
Hussein Mohamed contributed reporting from Mogadishu, Somalia.