Supporters say disputed Sri Lankan Prime Minister Mahinda Rajapaksa has decided to resign in an attempt to end the country's political crisis.

The decision Friday came a day after the Supreme Court ruled that President Maithripala Sirisena's decision to dissolve Parliament and appoint Rajapaksa as prime minister was unconstitutional.

A look at how Sri Lanka has plunged into a political crisis and what could happen next:

___

HOW IT CAME ABOUT

The conflict began when Sirisena sacked Prime Minister Ranil Wickremesinghe and appointed Rajapaksa, a former strongman president, in his place. Wickremesinghe said that Sirisena didn't follow the constitution in removing him and claimed to still be the lawful prime minister. Rajapaksa sought to secure a majority in Parliament but failed. In response, Sirisena dissolved Parliament and ordered new elections, but those actions were put on hold by the Supreme Court until it heard the case and delivered its judgment Thursday. After the court suspended the dissolution, Parliament reconvened and passed two no-confidence votes against Rajapaksa, but he held on to office with Sirisena's backing. Parliament also voted to block funds for him and his Cabinet. Lawmakers opposing Rajapaksa took the fight to the Court of Appeal, which suspended Rajapaksa and his Cabinet from functioning in their positions until it concludes the case. Rajapaksa asked the Supreme Court to end the suspension, but it rejected the request on Friday.

___

IDEOLOGICAL OPPONENTS

Sirisena and Wickremesinghe are ideological opponents who formed a coalition to defeat Rajapaksa in 2015 elections. Rajapaksa, who was president from 2005 to 2015, is considered a hero by some in Sri Lanka's ethnic Sinhalese majority because he oversaw the end of a 25-year civil war by crushing ethnic minority Tamil rebels in 2009. But his time in power was marred by allegations of war-time atrocities, corruption and nepotism. Sirisena had opposed Wickremesinghe's efforts to investigate alleged military abuses in the final days of the war.

___

WHAT COULD HAPPEN

A pro-Rajapaksa lawmaker, Lakshman Yapa Abeywardena, said Rajapaksa decided in a meeting with Sirisena to resign Saturday to allow the president to appoint a new government. Sirisena has resisted suggestions that he reappoint Wickremesinghe, but may now be compelled to do so since Wickremesinghe has shown he has the support of 117 lawmakers, a majority of the 225-member Parliament. Reappointing Wickremesinghe would allow a functioning government and Parliament. It would also allow lawmakers to dissolve Parliament by a two-thirds vote and hold new elections. Lawmakers could also attempt to impeach Sirisena on the basis of the Supreme Court ruling that his order to dissolve Parliament violated the constitution. But it may be difficult to obtain the required support of two-thirds of Parliament's members to approve an impeachment motion.

___

IMPACT OF A PROLONGED CRISIS

Without a functioning government, the national budget for 2019 can't be approved. That means that after Jan. 1 there would be no funds for public programs and no salaries for government employees. A $1 billion foreign debt repayment is due early next year and it is not clear if that can be paid without a finance minister legally in place.