Colombo (AFP) - A Sri Lanka court on Monday suspended Mahinda Rajapakse's powers as prime minister and ruled that his cabinet could not function until its legitimacy was established.

The court of appeal said "irreparable damage" could be done to Sri Lanka if Rajapakse, whose controversial appointment as prime minister a month ago sparked a political crisis, was allowed to remain as head of government.

Sri Lanka has been in crisis since October 26 when the president sacked Ranil Wickremesinghe as prime minister and appointed Rajapakse -- who was voted out twice by parliament last month but refuses to step down.

A majority of legislators asked the court last week to intervene, saying Rajapakse remained in office despite parliament passing motions against him.

"The position of the 122 MPs who filed the case was that Rajapakse had no legitimacy after losing two no-confidence motions," lawyer and legislator M. A. Sumanthiran told reporters.

It further undermines Rajapakse's ability to govern after parliament cut off his ability to spend any state finances.

President Maithripala Sirisena, who appointed Rajapakse, dismissed parliament last month but the Supreme Court intervened to restore it.

The decision by the Court of Appeal on Monday is the latest setback to Sirisena and Rajapakse, whose attempt to take power nearly two years ahead of the next elections plunged Sri Lanka into crisis.