Sri Lanka’s supreme court has suspended the president’s controversial decision to dissolve parliament and MPs are planning to meet to decide between the two men claiming to be the country’s lawful prime minister.

In a verdict hailed as one of the most important in Sri Lankan history, the court ruled on Tuesday evening to suspend the order by the president, Maithripala Sirisena, calling for fresh elections that followed his attempt to install Buddhist strongman Mahinda Rajapaksa in the prime minister’s office.

The court said it would hear a number of petitions challenging the presidential order starting on 4 December, meaning it could still be revived. Ranil Wickremesinghe, the prime minister whom Sirisena claimed to have fired last month, said after the ruling he now had an opportunity to demonstrate he commanded majority support in parliament.

“Today we have witnessed a resounding victory for the people’s franchise,” Wickremesinghe said. “The powers of the president are limited and he must act according to the law. He is not above the law.”

Wickremesinghe said parliament would resume on Wednesday and hold a confidence vote on his leadership. “We will be in parliament and we will show a majority, that we are the legitimate government of Sri Lanka,” he said.

Sri Lankan political crisis could lead to bloodbath, says speaker Read more

Karu Jayasuriya, the parliamentary speaker, said parliament would resume at 10am on Wednesday – though whether the body will be permitted to do so was unclear.

Sirisena could choose to again suspend parliament, as he did shortly after purporting to sack Wickremesinghe. The president also recently took control of the police, raising the possibility they may be involved in some attempt to stop parliament from meeting.

In a reference to the uncertainty, Wickremesinghe said on Tuesday he wanted “to remind the police that the honourable speaker is in charge of parliament and is responsible for the security of parliament, so they must adhere to what the speaker says”.

Sirasena has been attempting to install Rajapaksa, who ruled the country for a decade until 2015, as as the new prime minister. In his time in office, he drew the country closer to China and fell out with the west over a litany of alleged human rights abuses.

Rajapaksa assumed control of the prime minister’s office and named a cabinet, but his forces conceded last Friday they had failed to persuade enough MPs to join their government.

This failure was seen to be the catalyst for Sirisena dissolving parliament – hoping a national election would deliver his ally Rajapaksa into government and end the constitutional crisis.

The court ruling extends the political turmoil that has gripped the country since Sirisena announced he was firing Wickremesinghe on 26 September.

Rajapaksa’s son, Namal Rajapaksa, who is also an MP, told the Guardian he did not believe parliament should reconvene until the court issued a final judgment. “Until the judgment is given you can’t [do it],” he said, highlighting the possibility the court could reinstate the president’s order to dissolve the body when it hears the case again in a fortnight.

He wrote on Twitter: “This is not the court’s final decision. I [have] never seen politicians get so excited f[o]r postponing elections.” He said Wickremesinghe’s United National party had “a history of postponing polls but eventually voters will decide”.

Tuesday’s supreme court decision was met with cheers from crowds assembled in Temple Trees, the Colombo residence of the prime minister where Wickremesinghe has been hunkered down since the start of the crisis.

MA Sumanthiran, a Tamil MP, said the judgment was “the most important order the supreme court has delivered in its entire history”.