COLOMBO (Reuters) - Sri Lanka’s parliament on Wednesday passed a vote of confidence in its ousted prime minister, as it sought his reinstatement by the president to defuse a political crisis and avoid a government shutdown.

Sri Lanka's ousted Prime Minister Ranil Wickremesinghe looks on during a parliament session in Colombo, Sri Lanka December 5, 2018. REUTERS/Dinuka Liyanawatte

The South Asian island nation has been locked in political gridlock for more than a month since President Maithripala Sirisena replaced former Prime Minister Ranil Wickremesinghe with pro-China strongman Mahinda Rajapaksa.

Parliament has twice in the past few weeks voted to sack Rajapaksa but he has refused to resign.

Sirisena has repeatedly said he will not appoint Wickremesinghe “even if he has the backing of all 225 lawmakers in parliament”.

It was not immediately clear whether the confidence vote, passed by 117 votes to none, would help to see Wickremesinghe reinstated.

Lawmakers backing Sirisena and Rajapaksa chose not to participate in the parliament vote.

Sirisena dissolved parliament last month after Rajapaksa could not get majority support there.

The Supreme Court is considering whether to rule that the dissolution is unconstitutional. If it does, parliament will then need to pass a budget for 2019, or risk triggering a government shutdown.

“If there is no budget, no government officials could draw money and there could be a government shutdown. The government can’t even repay loans,” former finance minister Mangala Samaraweera told parliament.

A Supreme Court ruling is expected this week.

Many foreign countries have yet to recognize the new government.