Sri Lanka has been rocked by political turmoil after the president called on Friday for the prime minister to step down hours after the president’s party withdrew from the ruling coalition.

President Maithripala Sirisena issued a formal notice on Saturday for Prime Minister Ranil Wickremesinghe to step down. But the PM was standing his ground and refusing to go.

The dramatic move could see former president Mahinda Rajapakse return as the new prime minister, a development that would please China but not neighboring India.

Wickremesinghe continued to occupy Temple Trees, the official residence of the prime minister, and insisted in a letter to Sirisena that he was still in office, AFP reported.

He has said that he can be removed only by parliament where his party enjoys a majority, and vowed to seek legal action against what he condemned as an unconstitutional move against him.

“I am addressing you as the prime minister of Sri Lanka,” Wickremesinghe told reporters at a nationally televised press conference on Friday night. “I remain as prime minister and I will function as the prime minister.”

Rajapakse was sworn in as the new PM in a rushed ceremony, but the Parliamentary Speaker Karu Jayasuriya has said he will decide on whether to recognize Rajapakse or not, after seeking legal advice.

Parliament is not scheduled to meet until November 5 when the 2019 national budget is due to be presented. The Supreme Court, which is empowered to resolve constitutional disputes, is shut for the weekend and reopens on Monday.

Early on Friday, the president’s United People’s Freedom Alliance party quit the coalition that governed with Wickremesinghe’s party.

Speaking to jubilant supporters outside his home in Colombo late on Friday, Rajapakse called on Wickremesinghe to step down. Speaking through a loudspeaker, the former president said members of his party must “respect democracy, respect the country and respect the law”.

Supporters shut down state TV networks

Overnight, Rajapakse loyalists stormed two state-owned television networks – which they regard as loyal to the outgoing government – and forced them off the air.

Video footage from private networks showed police overwhelmed by mobs at the Rupavahini national TV station but elsewhere in the capital streets remained calm.

The United States called on all sides in Sri Lanka to operate within the constitution and refrain from violence, and urged the island to move forward on post-war reconciliation.

Rajapakse crushed the decades-long Tamil Tiger uprising while in power, but refused to acknowledge abuses committed during the bloody civil war.

“We call on all parties to act in accordance with Sri Lanka’s constitution, refrain from violence and follow due process,” the State Department said. “We expect the government of Sri Lanka to uphold its Geneva commitments to human rights, reform, accountability, justice and reconciliation.”

After Sirisena’s election in 2015, Sri Lanka shifted from confrontation to conciliation with the US and other Western powers and promised at the UN Human Rights Council in Geneva to investigate allegations of abuses.

Crisis had been brewing, trio lobbied New Delhi

The Times of India said the return of Rajapakse had been the subject of speculation for some time. New Delhi helped broker the coalition that removed Rajapakse, who upset its close neighbor by leasing the Hambantota port to Beijing and allowing China to dock its submarines in Sri Lanka.

In the past three months while trouble has festered in Sri Lanka’s ruling coalition, the president, PM and Rajapakse had all journeyed to India to lobby for support, the Times of India said.

with reporting by Agence France-Presse