Here are the 5 top facts from this big story
Official results showed Wickremesinghe polled 134 votes. His main opponent Dullas Alahapperuma got 82 and leftist front's leader Anura Dissanayake just three. Mr Wickremesinghe, a six-time prime minister, was being considered a frontrunner as he is backed by the Rajapaksas' SLPP, the largest bloc in the 225-member parliament.
The 73-year-old is despised by the protesters, who see him as a Rajapaksa ally and had also demanded his resignation as prime minister. Observers believe that Wickremesinghe will crack down hard on the protests.
As acting president, he extended a state of emergency in the country that gives police and security forces sweeping powers. This came after the protesters barged into the President's official residence.
Ahead of the vote, an opposition MP said Wickremesinghe's hardline stance against demonstrators went down well with MPs who had been at the receiving end of mob violence. "Ranil is emerging as the law-and-order candidate," Tamil MP Dharmalingam Sithadthan told news agency AFP.
Wickremesinghe's main opponent, SLPP dissident and former education minister Dullas Alahapperuma, was supported by the opposition. Leader of Opposition Sajith Premadasa had withdrawn from the presidential race in favour of Alahapperuma.
Sri Lanka's Economy Not Out Crisis Yet, Says President In Budget Speech Sri Lanka Fails To Reach Agreement To Get Next IMF Bailout Tranche Cop Sacked For Playing Piano As Protesters Broke Into Sri Lanka President's House Celebrated "Russian Spy" Whale Hvaldimir Found Dead In Norway: Report INDIA's "Hit With Footwear" Protest In Mumbai Over Shivaji Statue Collapse Nurse Molested By Patient During Late Night Shift At West Bengal Hospital Who Was Hersh Goldberg-Polin, US Citizen Who Was Killed By Hamas In Gaza UGC NET June Re-Exam 2024: Admit Cards For 4 Centers Released Red Alert In 11 Telangana Districts As Heavy Rain Causes Flooding Track Latest News Live on NDTV.com and get news updates from India and around the world.