COLOMBO, Sri Lanka – In a stunning result that was unthinkable just weeks ago, the challenger to Sri Lanka's longtime president defeated his onetime political ally on Friday, signaling the fall of a family dynasty and the rise of former Cabinet minister Maithripala Sirisena.
Sirisena, who defected from the ruling party in a surprise move in November, capitalized on the outgoing President Mahinda Rajapaksa's unpopularity among this island's ethnic and religious minorities, as well as grumbling among the Sinhalese majority about his growing power and the country's economic troubles.
Elections Commissioner Mahinda Deshapriya announced that Sirisena obtained 51.28 percent of the valid votes cast in Thursday's election while Rajapaksa got 47.58 percent. The two-term office holder Rajapaksa conceded defeat hours before the announcement and vacated his official residence.
Sirisena, 63 and a longtime politician, was expected to be sworn in later Friday.
The wider world was watching to see if the election was carried out fairly, especially since Pope Francis is scheduled to arrive in the country on Tuesday. So far, there were no signs of post-election violence.
Rajapaksa's defeat -- as well as his quiet early-morning concession, leaving his official residence while votes were still being counted -- came as a surprise in this nation of 21 million.
Rajapaksa had built up immense power after defeating the Tamil Tiger rebels in 2009, using his huge popularity with Sinhalese majority who hailed him as a king. He used his parliamentary majority to scrap a constitutional two-term limit for the president and gave himself the power to appoint many top officials. When Sri Lanka's chief justice objected to his moves, he orchestrated her impeachment.
He had also created a cult image for himself and installed numerous relatives in top government positions, sidelining the party's old guard, which helped give rise to the revolt that brought Sirisena to power.
One of Rajapaksa's brothers is a Cabinet minister, another is the speaker of Parliament and a third is the defense secretary. His older son is a member of Parliament and a nephew is a provincial chief minister. The diplomatic service was full of his relatives and friends.
Rajapaksa's concession was announced by Wijeyananda Herath, his media secretary.
Elections Commissioner Mahinda Deshapriya said the election was peaceful, although some voters were prevented from casting ballots in the Tamil-dominated north, according to the Center for Monitoring Election Violence.
Rajapaksa had been widely expected to easily win his third term in office until Sirisena suddenly split away in November, gathering the support of other defecting lawmakers and many of the country's ethnic minorities, making the election a fierce political battle.
Rajapaksa was still thought to be tough to beat because he controlled the state media, has immense financial resources and popularity among the Sinhala majority.
But polling was notably strong in Tamil-dominated areas, where voting had been poor in previous elections.
Many Tamils were believed to have voted heavily for Sirisena -- not so much because they supported him but because they despised Rajapaksa so much. He not only crushed the Tamil Tiger rebellion but also largely ignored Tamil demands to heal the wounds of the fighting and years of ethnic divisions.
Muslims, the second-largest ethnic minority, also appeared to have voted against Rajapaksa, who was accused of backing ultranationalist Buddhist groups and turning a blind eye on anti-Muslim violence last June.
And for the country's Sinhalese, which make up about three-quarters of the population, Sirisena's entry into the race gave them another credible option if they were fed up with Rajapaksa or wary of his growing clout.
While Rajapaksa's campaign centered around his victory over the Tamils and his work rebuilding the country's infrastructure and economy, Sirisena's focused on reining in the president's expanding powers. He also accused Rajapaksa of corruption, a charge the president denied.
The economy has grown quickly in recent years, fed by enormous construction projects, many built with Chinese investment money. But Sri Lanka still has a large underclass, many of whom are increasingly frustrated at being left out.