The six-time prime minister was chosen by a secret ballot of lawmakers a day ago to finish the term of former President Gotabaya Rajapaksa, who fled the country after protesters stormed his residence last week.
Sri Lanka's six-time prime minister Ranil Wickremesinghe has been sworn in as president of the South Asian nation, which is in the grip of a dire economic crisis that has sparked massive protests.
Wickremesinghe, 73, took his oath of office before chief justice Jayantha Jayasuriya at the tightly guarded parliament complex on Thursday, a statement from his office said.
Wickremesinghe won 134 votes in the 225-member parliament in a vote count on Wednesday, after his predecessor Gotabaya Rajapaksa fled the country and resigned last week amid growing calls for his ouster.
Sri Lanka's police chief and top military brass stood behind the new president as the oath was administered in the presence of parliamentary speaker Mahinda Abeywardana.
The brief ceremony was due to be broadcast live on local television but was cut off just before the swearing-in got under way. Officials said an investigation into the unexpected breakdown had been launched.
'Friend of the people'
Political sources said Wickremesinghe will invite all parties to join a cabinet of 30 ministers to steer the country out of its worst economic crisis since independence from Britain in 1948.
"There will be a few MPs from the main opposition joining the cabinet," a source close to Wickremesinghe said, adding that he was keen to ensure a rainbow coalition.
Former President Rajapaksa appointed Wickremesinghe as prime minister in May, hoping to bring stability to the country engulfed in a crisis that has left its 22 million people struggling with shortages of essentials including medicine, fuel and food.
And the resulting political crisis has left worries about whether a new government will be enough to fix the economy and placate a public furious at its leaders.
Protesters who stormed Rajapaksa's palace and toppled him earlier this month have accused Wickremesinghe of being a proxy of the once-powerful family.
Many of the hundreds of thousands who poured into the streets to force the ouster of Rajapaksa wanted Wickremesinghe gone too.
A section of protesters even targeted his official residence when he was prime minister and burnt down his private house.
Worshipping at a Buddhist temple on Wednesday evening after his election, Wickremesinghe vowed tough action against troublemakers.
"If you try to topple the government, occupy the president's office and the prime minister's office, that is not democracy, it is against the law," Wickremesinghe said.
"We will deal with them firmly according to the law. We will not allow a minority of protesters to suppress the aspirations of the silent majority clamouring for a change in the political system."
"I am not a friend of the Rajapaksas," he told reporters at the Gangaramaya temple. "I am a friend of the people."