Updated

Sri Lanka's elections commissioner says opposition candidate Maithripala Sirisena has been elected the country's new president hours after strongman Mahinda Rajapaksa conceded defeat and vacated his official residence.

Mahinda Deshapriya announced Friday that Sirisena obtained 51.28 percent of the valid votes cast in Thursday's election while Rajapaksa got 47.58 percent.

Rajapaksa's defeat was unthinkable until Sirisena defected from the president's Cabinet in November to challenge him.

He will be sworn in as president later Friday.