He received 134 votes from a possible 223.
Addressing parliament shortly after the result, Wickremesinghe said while the country had been “divided on party lines” the “time has now come to work together.”
Earlier this month, protesters set Wickremesinghe’s private residence on fire and overran the presidential palace in a desperate attempt to overthrow the government and end the chaos that has enveloped Sri Lanka since March.
The protesters appeared to have scored a victory when Rajapaksa fled and Wickremesinghe — prime minister at the time — vowed to resign to make way for a unity government.
But Wickremesinghe’s appointment Wednesday threatens to inflame the situation once again as many protesters see him as inextricably tied to the Rajapaksa regime. Even some members of the ruling Sri Lanka Podujana Peramuna political party have said they disapproved of him taking the top job.
As voting was taking place, a small group of protesters gathered on the steps of the Presidential Secretariat — the president’s office — to demonstrate against Wickremesinghe’s nomination.
Some chanted, “Ranil go home” in anger when the result was announced.
Many protesters insist only a complete overhaul of government will satisfy their demands, and some pledged they would stay on the streets.
“I am not surprised, but still disappointed at how corrupt and unfair the system is,” Kasumi Ranasinghe Arachchige, 26, told Reuters.
“We won’t back down, we won’t settle for anything less,” she said. “We will fight for what we deserve.”
Everyday life for most Sri Lankans remains a hardship. Streets in the commercial capital of Colombo are largely empty, with people queuing outside gas stations for hours, desperately hoping to buy fuel. Many businesses are shut and supermarket shelves are increasingly barren.
Rajapaksa’s government had not admitted that Sri Lanka was “bankrupt” and “needed to go to the International Monetary Fund,” Wickremesinghe said.
“I would like to tell the people I know what they are suffering,” he added. “We don’t need five years or 10 years. By the end of next year let’s start stabilizing, and certainly by 2024 let’s have a functioning economy which will start growing.”
His nearest challenger in Wednesday’s vote was former journalist Dullas Alahapperuma, who received 82 votes, while a third candidate, Anura Kumara Dissanayake, received three votes.
All eyes are now on Wickremesinghe and ongoing bailout talks with the International Monetary Fund as he attempts to navigate the worst economic crisis the country has seen in seven decades and keep a lid on the protests.