MOGADISHU, Somalia, Sept. 11 (UPI) -- World leaders praised Somali officials for selecting their new president but warned the coming months would be critical for the war-torn country.
Somali lawmakers late Monday selected activist and academic Hassan Sheik Mohamud as president.
Mohamud defeated the incumbent president Sharif Sheikh Ahmed by a vote of 190 to 79 on the second round of anonymous balloting.
Voice of America said lawmakers in the troubled West African nation broke into a spontaneous rendition of their national anthem when Mohamoud was proclaimed the winner.
"I want to ask the Somali people to lend me their helping hand in order to establish a functioning government throughout Somalia," Mohamoud said after his victory.
Augustine Mahiga, U.N. special envoy for Somalia, and his deputy paid a courtesy visit to the president Tuesday.
"The U.N. Political Office for Somalia leadership paid tribute to the integrity and quality of the process, which was both representative and transparent," a statement from the mission read.
Somalia leaders last month appointed some members of Parliament and drafted a constitution in a move that ended a political transition period. There hasn't been a functioning central government in Mogadishu since 1991.
The government struggles to extend its influence beyond the capital city as al-Qaida ally al-Shabaab controls parts of the country. The United Nations, however, said the political evolution was representative and Somali-owned.
Concerns about bribery and last-minute bureaucratic hurdles delayed an otherwise peaceful selection process Monday.
"Somalia's leaders must now work together to build a more representative and transparent system, tackle corruption and strengthen security and stability," British Prime Minister David Cameron said in a statement.
Ahmed conceded defeat and instructed the military to begin taking orders from the nation's new president, pledging to his help in the transition of power.
Mohamud is to serve a four-year term in office.