Libya's Supreme Court ruled on Monday that parliament's election of Prime Minister Ahmed Maiteeq a month ago was unconstitutional, a ruling that could reduce volatile political tensions in the major OPEC member state.
It also raised hope that some oil ports occupied for 10 months by rebels in Libya's east will reopen. In April, rebels signed an accord with the government of Maiteeq's predecessor to unblock the vital Mediterranean ports but its implementation stalled when they refused to deal with Maiteeq, a businessman.
Port rebel leader Ibrahim Jathran welcomed the Supreme Court ruling, according to a statement.
Maiteeq said he would accept the court decision, which reinstates Abdullah al-Thinni as caretaker premier, according to parliament's deputy speaker.
Libya has had two premiers - Thinni and Maiteeq - with two cabinets since the latter got elected in a chaotic vote by parliament a month ago, compounding a sense of anarchy and drift three years after the uprising that overthrew Muammar Gaddafi.
Gaddafi's one-man rule over 42 years left Libya without credible governing institutions and security services to impose state authority on ex-rebels and Islamist militants, who now use armed muscle to carve out fiefdoms and make demands on Tripoli.
Thinni had originally resigned in April after what he said was a shooting attack on his family home by militiamen, but then refused to hand over power to Maiteeq pending a court decision.
"The ruling stated... the appointment of Mr Ahmed Maiteeq as premier of the interim government was unconstitutional," state television quoted the court as saying, without citing the legal basis of its decision.
Parliament's second deputy speaker Salah Makhzoum told reporters that lawmakers would respect the ruling.
"Abdullah Al-Thinni is the caretaker prime minister until congress (parliament) learns the court's reasons for deciding Maiteeq's election was unconstitutional." Parliament will discuss the matter further on Tuesday, he said.