A US-trained economist has been elected the new president of Somalia’s semi-autonomous region of Puntland after defeating the incumbent by one vote, official results show.
President Abdirahman Farole obtained the vote of 32 MPs, compared with the 33 of his rival, Abdiweli Ali Gas.
Mr Farole said he accepted defeat, saying the peaceful election was a model for the rest of Somalia.
MPs elects the president in Puntland, once the main base of Somali pirates.
Many of the pirates, who seize ships off the East African coast for ransom, have retreated to the south because of a government crackdown on them, says BBC Somalia analyst Mary Harper.
But the southern-based militant Islamist group al-Shabab is increasingly operating in Puntland, which is believed to be rich in oil reserves, posing a major security challenge to the incoming president, she says.
In December, Puntland officials blamed al-Shabab for a car bomb attack that killed seven people in the port city of Bossasso.
Mr Gas – who studied at several US universities, including Harvard – beat Mr Farole in the third round in which one ballot was spoilt giving him the 33-32 victory margin, local media reports.
Neither got a clear majority in the first two rounds.
Mr Gas becomes the fourth president of Puntland, which is far more stable than other parts of Somalia.
Mr Farole, who was president for five years, congratulated him on his victory, saying the election had been conducted in a “civilized” way.
“Puntland has shown the rest of Somalia and the world that the democratic culture is alive and well here and this is what must guide us as we rebuild our country,” he added.
Mr Gas, the prime minister of Somalia in an interim administration from June 2011 to October 2012, said he welcomed the fact that Mr Farole had accepted defeat with “great dignity”.
It is rare for East African leaders to step down without challenging election results.
As a former Somali prime minister, Mr Gas may be more willing than his predecessors to work with the UN-backed government in Mogadishu which is trying to unite Somalia after years of civil war, our correspondent says.
In August, Mr Farole said he had suspended co-operation with the federal government, accusing it of adopting a “defective” constitution.
The UN special envoy to Somalia, Nicholas Kay, welcomed Mr Gas’s victory, saying Puntland was “leading the way on the development of a federal Somalia”.