Sri Lanka’s long-time leader Mahinda Rajapaksa has been defeated in the presidential election.
Official results showed Maithripala Sirisena, a former ally of the incumbent, had won 51.3% of the vote.
Mr Rajapaksa, in office since 2005, said on Twitter he looked forward to a peaceful transition of power.
His supporters credit him with ending the civil war and boosting the economy, but critics say he had become increasingly authoritarian and corrupt.
Mr Sirisena had already received promises of support from Tamil and Muslim leaders before the election.
But the result shows he also picked up a significant portion of the majority Sinhalese vote, most of whom solidly supported Mr Rajapaksa in previous elections.
Mr Sirisena, who is due to be sworn in at 18:00 (12:30 GMT), was surrounded by supporters and photographers as he left his offices earlier.
“We must allow all Sri Lankans to enjoy this victory, therefore avoid hurting or insulting people,” he said.
“I ask for everyone’s support to take this process forward with compassion and love.”