A Greek car ferry has been hired at short notice to house Libya's embattled parliament, who have been driven from the capital of Tripoli and fled to the far eastern town of Tobruk.

The gleaming white 17,000-ton Elyros liner, along with its crew, was brought to the coastal town as a temporary home for a government in exile from its usual seat of power. Islamists and their allies have now taken control of Tripoli and the country's second city Benghazi.

Just how long parliament can maintain its hold on power is unknown. "Libya has entered the condition of a failed state. We are very similar to Lebanon in the 1980s or Somalia," Libyan analyst Ezz Eddin Ukail, told the Washington Post. "We are at the doorstep of a civil war."

For the time being, parliament is convening in a hotel conference hall on one side of the bay, according to The Guardian, which is "ringed by troops in sandy-coloured US-made Humvee troop carriers".

Onboard the ferry itself, children of the exiled ministers play in the corridors, while meetings take place above the car deck in restaurants and bars "with bright lights and almost no people," The Guardian reports.

Meanwhile in Tripoli, militias control ministry buildings. "We have ministries without ministers. There is no one in power, no budget," said Adel Sunallah, the head of the Culture Ministry's media office. "The government is in a state of paralysis."

Many view the conflict as a battle between Islamists and liberals, but according to the Washington Post "in many ways it is less ideological than a political struggle for power".

During a visit to Tobruk yesterday, Bernardino Leon, the United Nations envoy to Libya urged the country's rival militias to cease fire and work towards a peace settlement.

The UN Secretary-General Ban Ki-moon backed Leon's comments describing Libya's slide towards civil war as "deeply alarming," Reuters reports.

"The spectre of rival claims of legislative and executive authorities can only deepen the existing political crisis and undermine the country's national unity," Ban wrote in a report to the UN Security Council.

The current conflict is part of an ongoing struggle between rival groups who combined to oust former dictator Muammar Gaddafi in 2011. The rebels have turned on one another in a bid for power and to control the country's vast oil reserves.

How did the fighting start?

Libya has been hit by instability since the overthrow of Gaddafi in October 2011. After the revolt, Libya's leaders have struggled and violence has spread, with the central government "increasingly losing control over the country to rogue and powerful militias", says the BBC. Elections in late June for a new parliament saw large losses for Islamist parties, triggering further battles between rival militias.

Who is involved in the fighting?

There was no single group in charge of the rebellion against Gaddafi three years ago, and now there are said to be around 1,700 armed groups. The Libyan Muslim Brotherhood and the remnants of the former Libyan Islamic Fighting Group, a one-time al-Qaeda affiliate, are among the Islamist camp. They are loosely allied with powerful militias from the city of Misrata. On the other side of the ideological divide is former general Khalifa Haftar and his allies who are against the Islamists. The fighting has closed the country's two main airports and plunged Benghazi and Tripoli into chaos.

How bad is the violence?

The Libyan government says around 150 people have died in the country's two biggest cities during two weeks of fighting. In Tripoli, petrol is scarce and power is off more than it is on. "Anarchy has broken out," says The Guardian, with several banks raided by armed gangs and kidnappings rampant. Rival militias trade fire, much of it landing on innocent civilians. One rocket strike killed 23 Egyptian workers yesterday, while thousands more people are fleeing their homes. Similar scenes are taking place in Benghazi, where air force jets allied with Haftar have hit Islamist militia bases killing 36 people.

What next?

The New York Times says there are reasons to hope that Libya will "pull itself back from the brink". The country has not yet descended into the kind of bloodletting seen in Iraq and Syria, it says. The Financial Times agrees that there is still hope, but warns that the events in recent weeks have further lowered the chance of success. "Even those attempting to mediate the conflict are being shoved out of the political arena," it says. "Civil society groups and activists that were at the forefront of the 2011 revolution face dire threats. The men with guns and extreme political agendas have grown bolder."