Sri Lanka has an undisputed prime minister for the first time in more than 50 days after one of the two men who have claimed to lawfully occupy the post was sworn in on Sunday, a day after his challenger resigned. Supporters of Ranil Wickremesinghe celebrated the defeat of a “coup” as he signed official papers in Colombo, marking the end of a crisis that left the country without a prime minister or cabinet and on the verge of a government shutdown. Hon. @RW_UNP has been sworn in as the Prime Minister. We thank the citizens of the country who fought the illegal seizure of power and ensured that Democracy was restored. #lka #SriLanka #coupLK pic.twitter.com/fyYnQk8OUu — UNP (@officialunp) December 16, 2018 <!--//--><![CDATA[// ><!--\n\n\n//--><!]]> But analysts warned of more instability ahead for the Indian Ocean island including the possibility of increased anti-western rhetoric and resentment towards the country’s Tamil minority. Wickremesinghe had planned to be sworn in at 11.16am on Sunday morning, an auspicious time according to Sinhala tradition, but was delayed by the late arrival of President Maithripala Sirisena. It augured poorly for a political relationship that has turned toxic in the past 18 months, culminating in Sirisena’s surprise announcement in October that he was firing Wickremesinghe. Wickremesinghe said his return was a victory “for Sri Lanka’s democratic institutions”. Pictures from the ceremony posted on social media by Wickremesinghe’s allies – journalists were prevented from attending – showed the pair grinning with palms clasped towards each other. But Sirisena has spent six weeks trying to avoid the outcome, even trying to dismiss the entire parliament and call an election once it became clear his chosen successor, Mahinda Rajapaksa, could not command a majority of MPs. The Sri Lankan Supreme Court stopped the election on Thursday, and on Friday extended a ban on Rajapaksa from exercising any official duties. It followed weeks of back room dealing by Rajapaksa to confirm his leadership in parliament and, once that failed, efforts to disrupt the assembly by pelting opposing MPs with books, chairs and water mixed with chilli powder; scenes of chaos on the floor that were broadcast around the world. On Friday night, the impasse broke, with Rajapaksa signalling he was finally willing to resign, clearing the way for Wickremesinghe’s return. Rajapaksa said in a departing speech the popular momentum behind his party was irresistible and would soon return them to power. “What is now gathering against the enemies of the country is a countrywide political force that no one can stop,” he said. Some supporters have cast his aborted return as the result of a western-backed conspiracy against a leader who drew Sri Lanka closer to China during his earlier 10-year rule that ended in 2015. “We fought against foreign intelligence agencies such as CIA and MI6,” said Udaya Gammpilla on Saturday. “We knew it was a tough battle. Foreign diplomats cheered in parliament when the speaker pronounced that we did not have a majority.” Wickremesinghe’s government is likely to quickly pass a budget that will allow government services to resume and reassure the country’s lenders including the International Monetary Fund that it can finance its heavy external debts. N Sathiya Moorthy, a director of the Delhi-based Observer Researcher Foundation, said Wickremesinghe’s new ruling coalition depended on Tamil legislators and would be under pressure to accept their demands. That could be exploited by Rajapaksa, whose Buddhist nationalist party traditionally takes a hard line on Tamil demands for greater autonomy and accountability for crimes committed during a three-decade long civil war. “Rajapaksa has already sounded the battle bugle on the Tamil issue,” Moorthy said.