Mohamed Abdullahi Mohamed's victory in Somalia's presidential election last week brought joyous crowds into the streets of Mogadishu, a testament to the former prime minister's enduring popularity.
But analysts warn that the iron will and nationalist discourse that Somalis fondly remember from his time as premier could be Mohamed's biggest obstacles when it comes to rebuilding the world's most notorious failed state.
Mohamed, who is better known by his nickname Farmajo, or "Cheese", has inherited an administration that has limited control over Somali territory due to the presence of Shabaab Islamists, and is heavily propped up by the international community.
This fragile core is further weakened by deeply entrenched corruption and the rivalries in a maze-like clan structure that dominate Somali politics.
"There is a super-sized expectation, but the problems that bedevilled Somalia for three decades won't vanish because Farmajo is the president," said Abdirashid Hashi, a researcher at the Heritage Institute.
- Why so popular? -
While prime minister for a mere eight months in 2010-11, Farmajo swiftly won over Somalis with his efforts to improve governance.
His resolute nationalism, in which he tried to revive Somali pride in a nation best-known for anarchy and bloodshed, was also well regarded.
He culled the number of government ministers and banned non-essential foreign trips by officials, and launched a program for stamping out corruption.
Farmajo's image also received a boost from the improved security in Mogadishu which saw Shabaab militants driven from the capital a few months after he stepped down as premier.
"It was under Farmajo that the groundwork was laid for this victory," said Roland Marchal, a researcher at Sciences Po university in Paris.
He was also highly popular within the military, not least because his government made sure to regularly pay soldiers, a rarity in Somalia's turbulent history.
- Risky nationalism -
Farmajo inherits a Somalia still operating under an interim constitution, with little in the way of solid administrative structures: the army, central bank, fiscal administration and electoral commission remain rudimentary.
While Farmajo favours a strong central government, Somalia has in recent years shifted towards a system of federalism.
The building of a state will require careful negotiations with powerful regions such as Puntland, Jubaland and Galmudug to finalise the constitution, properly define the federal agenda -- which has already been a bone of contention -- and stabilise the country.
"The fatal error of past Somali presidents has been to believe they can govern simply because they have a title," said Matt Bryden, a Somalia specialist with the Nairobi-based Sahan thinktank.
"The federal member states can't be ignored. Most are still embryonic but they have presence on the ground, they collect taxes, and they control the paramilitary forces that are fighting Al-Shabaab."
- Tension with Ethiopia -
Another tricky issue Farmajo will have to navigate is Somalia's tense relationship with its powerful neighbour Ethiopia.
The two nations have a long history of conflict over territory. Ethiopia has on several occasions sent troops into Somalia to fight Islamists and its current powerful military presence in the country and perceived political meddling irks many.
Analysts say that many young lawmakers voted for Farmajo because they are fed up with seeing Addis Ababa intervene in Somalia's affairs.
But analysts say antagonising Ethiopia could backfire: the country could withdraw its military from fragile border zones and thus offer a respite to militants, or it could lend its support to Somali regions hostile to central government.
"If he wants to re-adjust the relationship between Somalia and Ethiopia, he has to be very careful," said Rashid Abdi of the International Crisis Group.
"If he uses the old anti-Ethiopia rhetoric, he is going to quickly run into trouble."
- Lessons learned? -
During his short term as prime minister, Farmajo's direct style made him few friends among the country's old guard of politicians, many of whom were happy to see the back of him.
But his surprise presidential victory after a tortuous six-month voting process -- marked by claims of vote-buying and corruption -- may prove that he has learned to navigate Somalia's corridors of power.
"These last days, he has held lots of consultations," Abdi said.