Acting President Ranil Wickremesinghe was elected Sri Lanka’s new head of state by MPs on Wednesday, replacing ousted leader Gotabaya Rajapaksa.
Mr Wickremesinghe, 73, beat Dullas Alahapperuma, a candidate who had the support of a faction within the ruling party, and left-leaning lawmaker Anura Kumara Dissanayake from the opposition Janatha Vimukthi Peramuna party.
The new president secured 134 of the votes cast in the 225-seat Sri Lanka Parliament.
Mr Wickremesinghe described the victory as an honour and a privilege when he addressed Parliament.
"Our divisions are now over," Mr Wickremesinghe said, inviting Mr Alahapperuma "to join me and work together to bring the country out of the crisis we are facing".
Sri Lankan authorities ringed the Parliament building with heavy security as MPs prepared to choose from the three candidates, hoping the new leader can pull the island out of an economic and political crisis.
The response of protesters was broadly muted, with just about 100 people gathered on the steps of the presidential secretariat, but some vowed to turn their focus to dislodging Wickremesinghe.
"We're shocked. He's a person handling things in a very cunning way," protester Damitha Abeyrathne said of the leader. "He will start controlling us in a different way. As protesters, we will start our struggle again."
“If Ranil comes [into power], we cannot have stability,” Duminda Nagamuwa, who organised protests in Colombo after the nominations were finalised, said before the vote.
Other protesters have said he is an ally of the powerful Rajapaksa family, who they blame for the economic crisis. The Rajapaksas' Sri Lanka Podujana Peramuna (SLPP) party, the largest in parliament, backed Wickremesinghe for the presidency.
Hundreds of thousands of people had come out on to the streets to protest against his administration and occupied his official residence and office in Colombo.
Protesters also burnt down Mr Wickremesinghe's home and stormed his office.
Mr Wickremesinghe has pledged to crack down hard if protesters take to the streets and hundreds of heavily armed troops and police stood guard outside the parliament, but there were no signs of demonstrators.
As acting president, Mr Wickremesinghe extended a state of emergency that gives police and security forces sweeping powers, and last week ordered troops to evict protesters from state buildings they had occupied.
On Wednesday he vowed to take tough action against anyone resorting to what he called the undemocratic means that led to his predecessor's ouster.
"If you try to topple the government, occupy the president's office and the prime minister's office, that is not democracy and we will deal with them firmly," Mr Wickremesinghe said hours after he was elected.
Opposition MP Dharmalingam Sithadthan said ahead of the vote that Mr Wickremesinghe's hardline stance against demonstrators had gone down well with MPs who had been at the receiving end of mob violence, describing him as the "law-and-order candidate".
Political analyst Kusal Perera said he had "regained the acceptance of the urban middle classes by restoring some of the supplies like gas and he has already cleared government buildings showing his firmness".
Outside the presidential secretariat, where protesters camped for months to demand Rajapaksa step down, civil enginer Nuzly Hameem said he was "disappointed" by the result.
"We expected more from our parliamentarians," he told AFP.
The protests would "obviously" continue, he said, but added "We are burnt out. It's been four months."
Born into a wealthy, politically active family whose fortune was made in timber and the media, Mr Wickremesinghe has served as a lawmaker for 45 years. His reputation suffered during a previous stint as prime minister in a difficult power-sharing arrangement with then-President Maithripala Sirisena. A communication breakdown between them was blamed for intelligence lapses that led to a terror attack in 2019 that devastated tourism even before the catastrophic blow from the pandemic.
He earned a law degree from the University of Colombo and practiced as a lawyer before entering politics in 1977, becoming the youngest lawmaker at the time. He was first appointed prime minister in 1993 and also was an opposition leader for more than a decade.
Wickremesinghe has generally kept details of his private life under wraps. He is married to Maitree Wickremesinghe, a professor and expert on gender and women’s studies.