Sri Lanka's disputed prime minister Mahinda Rajapaksa folds his hands in prayer as he is blessed by a Buddhist monk after signing his resignation paper in Colombo, Sri Lanka, Saturday, Dec. 15, 2018. Rajapaksa resigned on Saturday, saying he wants to end a political impasse over his appointment. (AP Photo/Eranga Jayawardena)

Sri Lanka's disputed prime minister Mahinda Rajapaksa folds his hands in prayer as he is blessed by a Buddhist monk after signing his resignation paper in Colombo, Sri Lanka, Saturday, Dec. 15, 2018. Rajapaksa resigned on Saturday, saying he wants to end a political impasse over his appointment. (AP Photo/Eranga Jayawardena)

COLOMBO, Sri Lanka (AP) — Sri Lanka’s disputed prime minister announced Saturday that he would step aside, paving the way for his sacked predecessor to regain the position and apparently ending a political impasse that has paralyzed the government for nearly two months.

Mahinda Rajapaksa’s resignation signals the end of a crisis that began in October when President Maithripala Sirisena sacked Prime Minister Ranil Wickremesinghe and appointed Rajapaksa as his replacement.

ADVERTISEMENT

“Since I have no intention of remaining as prime minister without a general election being held, and in order to not hamper the president in any way, I will resign from the position of prime minister and make way for the president to form a new government,” Rajapaksa said in a televised statement.

After his appointment as prime minister, Rajapaksa sought to secure a majority in the 225-member Parliament but failed. Sirisena then dissolved Parliament and called new elections, but the Supreme Court struck down the move as unconstitutional.

On Wednesday, Wickremesinghe secured the support of 117 lawmakers in a confidence vote in Parliament, forcing Sirisena to relent from his promise not to reappoint the man he had sacked.

Wickremesinghe and his Cabinet will be sworn in on Sunday.

Rajapaksa said, however, that he would continue to fight along with Sirisena’s support to have an early election.

“The change of government that the people expected has now had to be put off,” he said. “But the people will definitely get the change they desire. No one can prevent that.”

Rajapaksa’s resignation came a day after the Supreme Court extended a lower court’s suspension of Rajapaksa and his Cabinet. The top court put off the next hearing until mid-January, when it planned to rule on whether they should hold office after losing two no-confidence votes in Parliament. It is uncertain if this case will continue now.

Sri Lanka has had no functioning government for nearly two weeks since the Court of Appeal suspended Rajapaksa and his Cabinet and was facing the prospect of being unable to pass a budget for next year if a new government is not appointed quickly.

The country faced the risk of being unable to use state funds from Jan. 1 if there was no government to approve the budget. It also has a foreign debt repayment of $1 billion due in early January, and it was unclear if it can be serviced without a lawful finance minister.

ADVERTISEMENT

Rajapaksa is a former strongman president who is considered by many a war hero for defeating the Tamil Tiger rebels in 2009 after a long civil war. But he lost a 2015 re-election bid amid allegations of wartime atrocities, corruption and nepotism.

Sirisena was health minister in Rajapaksa’s Cabinet when he joined Wickremesinghe and ran against Rajapaksa in the 2015 presidential election. After winning the election, Sirisena formed a unity government with Wickremesinghe as prime minister, but had disagreements with his economic policies and his efforts to investigate alleged wartime atrocities.