Sri Lankan Prime Minister Mahinda Rajapaksa resigned on Saturday in an attempt to put an end to the weeks of political instability in the country, PTI reported. He signed the resignation letter at his home in Wijerama in Colombo. Ousted Prime Minister Ranil Wickremesinghe is expected to take oath on Sunday, according to The New Indian Express.

Rajapaksa’s son Namal Rajapaksa had said on Friday that his father will step down the next day in interest of the “stability of the nation”. Namal Rajapaksa, a member of Parliament, had said the Sri Lanka Podujana Peramuna, the Sri Lanka Freedom Party and others will now work with President Maithripala Sirisena’s United People’s Freedom Alliance to form a broader coalition government.

The island country has been in a state of political turmoil since Sirisena ousted Prime Minister Ranil Wickremesinghe and replaced him with Mahinda Rajapaksa, a former president, on October 26. He suspended Parliament to prevent a vote, then lifted the suspension, but dissolved it again in November and called for snap elections on January 5. Rajapaksa’s government has lost two trust motions in Parliament. On Thursday, the Supreme Court of Sri Lanka ruled that Sirisena’s decision to dissolve Parliament was illegal and unconstitutional.