COLOMBO - Sri Lanka's Supreme Court on Thursday ruled President Maithripala Sirisena's decision to dissolve parliament ahead of its term as illegal, in a setback for the embattled leader in his face off with an elected premier.

Sirisena dissolved parliament on Nov. 9 and called a general election for Jan. 5 days after sacking Prime Minister Ranil Wickremesinghe and naming opposition leader Mahinda Rajapaksa to the post.

But the court rejected that decision. "President can't dissolve parliament before four-and-half years," Supreme Court Judge Sisira de Abrew said.

The court verdict means parliament elections will be held as scheduled after February 2020 and raises the possibility of Wickremesinghe reinstated as prime minister since his coalition enjoys a majority in parliament.

(Reporting by Ranga Sirilal Writing by Shihar Aneez; Editing by Sanjeev Miglani) ((shihar.aneez@thomsonreuters.com; +94-11-232-5540; Reuters Messaging: shihar.aneez.thomsonreuters.com@reuters.net twitter:@shiharaneez))