Sirisena administered the oath that restored Wickremesinghe to office on Sunday.
“We thank the citizens of the country who fought the illegal seizure of power and ensured that Democracy was restored,” Wickremsinghe’s United National Party wrote in a post on Twitter shortly after he was sworn in.
In late October Sirisena dismissed the cabinet and replaced Wickremesinghe with former strongman President Mahinda Rajapaksa, who led the campaign to crush Tamil Tiger guerrillas in 2009. Rajapaksa stepped down from the post on Saturday.
The country’s Supreme Court had ruled on Thursday that Sirisena’s firing of the Prime Minister violated the constitution.
At the time of the sacking, Sirisena said he made the decision due to “political problems (and) economic troubles” which he believed only Rajapaksa could solve.
The decision created a constitutional crisis, with Wickremesinghe insisting he was still Prime Minister, leading to mass protests in the capital Colombo.
Sirisena had attempted to dissolve Parliament to avoid the vote but the Supreme Court overturned that decision as well.
The chaos has damaged Sri Lanka’s economic standing, with Fitch Ratings downgrading it from ‘B+’ to ‘B’ in December due to the political upheaval.