Sri Lanka’s crisis looked over Saturday as strongman Mahinda Rajapakse bowed out of a power battle that had crippled the island nation for seven weeks and sent it heading for a possible debt default.

Rajapakse held a multi-religious service at his home where he signed a letter backing down from the post of Prime Minister controversially conferred on him in October 26.

Rajapakse’s decision came after the Supreme Court confirmed that he could not exercise the powers of a Prime Minister until he proved his legitimacy, which without enough support in parliament was impossible.

President Maithripala Sirisena triggered the political turmoil by sacking Premier Ranil Wickremesinghe and replacing him with his flamboyant former foe Rajapakse.

In a major Climbdown, Sirisena agreed on Friday to reinstate Wickremesinghe on Sunday despite previously insisting he would never reappoint him as Prime Minister.