In a dramatic development, Sri Lankan strongman Mahinda Rajapaksa staged a political comeback on Friday, becoming the new Prime Minister after President Maithripala Sirisena sacked premier Ranil Wickremesinghe who termed the move as "unconstitutional" and vowed to prove his majority in Parliament.
The sudden development came amid growing tensions between Sirisena and Wickremesinghe on several policy matters and the President has been critical of the Prime Minister and his policies, especially on economy and security.
Rajapaksa, 72, tweeted a photo of him and Sirisena after the swearing in ceremony at the Presidential Secretariat here.
"Former #SriLanka President Mahinda Rajapaksa sworn in as new Prime Minister," he said in the tweet.
After Rajapaksa took oath, Sirisena wrote to Wickremesinghe, saying he had been removed.
"I had appointed you as the prime minister under (article) 42 (1) of the Constitution and as your appointing authority, I write to notice that you have been removed from the post of prime minister," Sirisena said in the letter.
Reacting sharply to his sacking, Wickremesinghe asserted that the swearing in of Rajapaksa in his place is "illegal and unconstitutional" and he will prove his majority in Parliament.
The United National Party (UNP) leader vowed to carry on as prime minister despite being removed by Sirisena.
"I will continue to be the Prime Minister. Mahinda Rajapaksa's appointment is unconstitutional," Wickremesinghe said.
"The country is not in a crisis, I am the PM," he told reporters, adding that he will continue to be the prime minister till he enjoys the majority in Parliament.
"Only I have the majority. The only way that can be changed is through a no confidence motion or if I resign," Wickremesinghe said referring to the 19th amendment to the Constitution.
In April, he successfully defeated a no trust motion in Parliament engineered by Sirisena with backing from Rajapaksa.
The UNP, however, suffered one defection after Rajapaksa was sworn in with Ananda Aluthgamage meeting the former president and extending him support.
Similarly, Finance Minister Mangala Samaraweera tweeted that "the appointment of Mahinda Rajapaksa as the Prime Minister is unconstitutional and illegal. This is an anti-democratic coup".
The political developments unfolded after Sirisena's broader political front United People's Freedom Alliance (UPFA) announced that it has decided to quit the current unity government with Wickremesinghe's United National Party (UNP).
Mahinda Amaraweera, agriculture minister and the general secretary of the UPFA, told reporters that the UPFA decision has been conveyed to Parliament Speaker Karu Jayasuriya.
The unity government was formed in 2015 when Sirisena was elected President with Wickremesinghe's support, ending a nearly decade-long rule by Rajapaksa.
Rajapaksa's return to power ends a more than three-year-old coalition government that was formed by Sirisena and Wickremesinghe on a promise to combat corruption and financial irregularities.
Sirisena, who was Rajapaksa's minister of health, broke away from him to contest the presidential elections.
Political analysts said Sirisena's move to install Rajapaksa as the prime minister could lead to a constitutional crisis as the 19th amendment to the Constitution would not allow the sacking of Wickremesinghe as the premier without a majority.
Rajapaksa and Sirisena combine has only 95 seats and is short of a simple majority. Wickremesinghe's UNP has 106 seats on its own with just seven short of the majority.
The unity government was thrown into a crisis after Rajapaksa's new party pulled off a stunning victory in local elections in February seen as a referendum on the ruling alliance.
Last week, it was reported that Sirisena accused his senior coalition partner the UNP of not taking seriously an alleged conspiracy to assassinate him and Gotabhaya Rajapaksa, the former top defence ministry bureaucrat and brother of ex-president Mahinda Rajapaksa.
Sri Lanka nearly faced economic sanctions from the West over Rajapakse's brutal military crackdown on the banned Liberation Tigers of Tamil Eelam (LTTE).
The LTTE sought a separate Tamil homeland in the northern and eastern provinces of the island nation for nearly 30 years before its collapse in 2009 after the Sri Lankan Army killed its supreme leader Velupillai Prabhakaran.
Rajapaksa and his family were facing several cases of corruption and financial irregularities.