Mogadishu - Former cabinet minister Mohamed Osman Jawaari was elected speaker of Somalia's parliament by a majority vote on Tuesday to lay the groundwork for a new government in the war-torn Horn of Africa country.
The next step in a Western-backed plan to end two decades of strife is the election of a president charged with the task of rebuilding institutions plagued by corruption and infighting.
Somalia has been mired in civil strife, grinding poverty, Islamist militancy and maritime piracy since warlords toppled military dictator Mohamed Siad Barre in 1991, leaving the nation without an effective central government.
Jawaari, a veteran politician and former transport minister under Barre who can speak and write in Arabic, English, Italian and Norwegian, won after the first round of voting.
His closest rival Ali Khalif Galeyr bowed out of the race after conceding defeat just before the second round of voting.
"I thank my friends who gave me the votes and all of you," Jawaari said, adding that he would give a formal speech later.
Government and African Union peacekeeping troops had tightened security around the School Poliscio, a former police training camp, where the election took place.
Galeyr said: "I hereby give up and say let my votes go to Jawaari - I congratulate him," Ali Khalif Galeyr said.
The speaker of a reformed parliament and a new president should have been elected before August 20, but the deadline was missed.
The key question is whether the new government can break the pattern of ineffective interim administrations in recent years.
The election of Jawaari as speaker could be a stumbling block in the path of former speaker Sharif Hassan's political ambitions.
The two both hail from the Rahanweyn clan. It is expected that the country's top jobs will be spread out among the main clans.
"Hassan has clearly shown he wants to run for the presidency and although the clan issue is there, he is not constitutionally barred from the race," Rashid Abdi, an independent Horn of Africa analyst, told Reuters.
Under the terms of a political road map, Somalia must establish a legitimate government seen as inclusive by the country's fractious clans.
The new government will replace an 8-year-old Transitional Federal Charter and lead to the conclusion of the transition process.
An African Union force has managed to drive al Shabaab, an al Qaeda-linked Islamist group, out of the capital Mogadishu.
But the rebels remain the strongest of an array of militias which have a history of wrecking political settlements and perpetuating war, instability and famine.