Former Sri Lankan President Mahinda Rajapaksa has been sworn in as prime minister after the country's president sacked incumbent Ranil Wickremesinghe, in a surprise move that threatens political turmoil in the Indian Ocean nation.
The appointment was confirmed in a statement from President Maithripala Sirisena's office on Friday, but Wickremesinghe later insisted he remained the prime minister.
"I retain the confidence of the house. I am the prime minister and I have the majority," Wickremesinghe told local media.
"According to the constitution, I'm the prime minister. That [ousting] is not legal." Sirisena, who was health minister under Rajapaksa from 2010 to 2014, joined forces with Wickremesinghe to defeat the former president in elections in January 2015.
He was elected as president largely thanks to the backing of Wickremesinghe's United National Party (UNP).
But earlier on Friday, Sirisensa's United People's Freedom Alliance (UPFA) had said it would quit the ruling coalition.
The developments bring an end to a coalition government that was formed more than three years ago on promises of economic reform and accountability for alleged atrocities committed during Rajapaksa's 10-year rule at the close of Sri Lanka's bloody civil war.
'Instability and uncertainty'
Al Jazeera's Minelle Fernandez, reporting from Colombo, said Rajapaksa's shock appointment has brought uncertainty to Sri Lanka amid questions whether the president has the power to dismiss the prime minister.
"There was no inkling that this might happen. It was only after the swearing-in that we started seeing videos and pictures of the ceremony," she said.
Mangala Samaraweera, the finance minister of the outgoing government, argued that Rajapaksa's appointment was a violation of the constitution, which was amended in 2015 to curtail the president's powers.