Sri Lanka’s parliament passed a motion of no-confidence in the controversially appointed government of Mahinda Rajapaksa Wednesday, a day after the Supreme Court overturned a presidential decree dissolving the legislature.

Speaker Karu Jayasuriya ruled that a majority of the 225-member assembly supported a no-confidence motion against Rajapaksa who was made prime minister on October 26 in place of Ranil Wickremesinghe.

The result does not automatically mean that Wickremesinghe, whose party is the biggest in parliament, has won the constitutional showdown. President Maithripala Sirisena retains the power to choose the next prime minister.

In a major boost to sacked prime minister Ranil Wickreme­singhe’s fight to reclaim the post from an arch-rival, Sri Lanka’s Supreme Court on Tuesday overruled President Maith­ripala Sirisena’s dissolution of parliament.

Wickremesinghe had called the court ruling “a victory for the people and a victory for decent politics in this country”.

President Maithripala Sirisena had on November 9 dissolved the parliament in a gamble that a new election will get backing for his preferred candidate as prime minister over an ousted premier who has refused to give up.

He had announced a snap election on January 5.

Sirisena signed a decree dismissing the island’s 225-member assembly just hours after his party admitted it did not have enough votes to get support for former president Mahinda Rajapakse against rival claimant Ranil Wickremesinghe.

The two have been battling for the prime minister’s post for two weeks as international concern grows over the mounting turmoil.

Sirisena sparked the crisis on October 26 by naming Rajapakse, the country’s authoritarian president from 2005 until 2015, as prime minister after sacking Wickremesinghe.

Wickremesinghe has since refused to leave the premier’s official residence while the president also suspended parliament to head off any revolt against his action.

(With AFP inputs)