Libya's supreme court has invalidated the country's internationally recognised parliament after a legal challenge by a group of politicians.
The court said the parliament was unconstitutional, dealing a blow to Libya's elected government, which is operating in the country's east.
The ruling was celebrated by militias occupying the capital Tripoli, who have set up an alternative parliament.
A Libyan MP told the BBC: "We do not recognise... this ruling."
Abu Bkr-Bouiera added that the ruling was "baseless" and said it was "a step towards dividing the country", which Libya's parliament, elected in June, would not comply with.
Politicians in Tobruk, the city near the Egyptian border where the parliament is now based, have repeatedly alleged that Tripoli's courts, judges and their families have been under threat by the coalition of armed groups that controls the capital.
Prosecution lawyers who won Thursday's case denied that claim. The judges could not be reached for comment.
Analysis: Rana Jawad, BBC News, Tripoli:
This ruling has deepened Libya's political crisis and is likely to plunge the country into further disarray. Many worry this could ignite a full-blown war as both sides dig in their heels.
The United Nations dialogue initiative to unite the minority group of boycotting MPs with their colleagues now appears dead in the water.
The hope was to fix the elected body and strengthen its legitimacy to end the political stalemate.
The international community has been banking on that solution, with the hopes that in the long-term a coalition government would be formed.
But as the politics is complicated further, so too will any potential solutions.
The reason for the court's decision is not yet clear. Those behind the challenge - a minority group of dissident MPs - say the parliament is unconstitutional because it does not sit in Tripoli or Benghazi, AFP news agency reports.
The group added that parliament had overstepped its authority by calling for foreign military assistance against the militias.
Infighting and instability
Libya has been plagued by instability since the overthrow of Colonel Muammar Gaddafi in 2011. Different groups now control most of the country including the two largest cities, Tripoli and Benghazi.
Islamist-leaning militias, some of them remnants of forces which helped oust Gaddafi, have been fighting for power among themselves.
Recent clashes forced the country's parliament to move to Tobruk.
The groups that took control of the capital in August attempted to reinstate Libya's previous parliament and appoint a parallel government, but this has not been recognised internationally.
'We will go back'
Meanwhile, a cousin of Gaddafi has said that former regime figures are planning to return to Libya within two months.
Ahmed Gaddaf al-Dam told the Times newspaper that they would return once government forces regained control of the country's major cities.
Mr Dam claimed exiled supporters of Gaddafi were in talks with parliament, despite it being forced out of the capital.
The former special envoy to Egypt said he wanted to get "Libya back from this mess" and supports a national reconciliation programme.
"We are optimistic, in a couple of months peace is coming to Libya," Mr Dam told the newspaper. "And we will go back", he added.