“THE only road to paradise,” runs a joke doing the rounds in the cafés of Tripoli, Libya’s seafront capital, “is the one to the international airport.” Most Libyans still revel in the freedom and sense of possibility brought on by the NATO-backed war that ousted Colonel Muammar Qaddafi two years ago. “Yet before, when someone disappeared, you knew they were with Qaddafi forces,” reminisces a rebel-turned-security man. “Now we have no idea.” That was made clear earlier this month when the government denounced the kidnap of the daughter of Abdullah al-Senussi, Qaddafi’s former spy chief, only to discover that one of its own forces had nabbed her; she was freed a few days later.

Libya has hit its rockiest patch since Qaddafi’s demise. No one has managed to reassert full authority over the tribes, regions and groups welded together under the colonel’s iron rule. Institutions of state, absent under Qaddafi, have yet to take firm shape. In the past few weeks the country’s key oil ports have been blockaded by disgruntled workers and militias. Assassinations and carjackings are rife. Water and electricity have been cut off in Tripoli for the past week. On September 11th a bomb was defused in Tripoli; another went off in Benghazi, the cradle of the anti-Qaddafi revolt and the main city of the east.

Security is the biggest complaint. “A state at its most basic has a monopoly of force,” says Anas al-Gomati, who runs Sadeq, a Libyan think-tank. “Here you can argue that the government works for the militias.” The authorities, with Western help, are in the process of building an army and police force which are supposed to take over from the militias on its payroll, most notably the Supreme Security Committee (SSC), a collection of former rebels which functions as a temporary police force, and the Libyan Shield, a group of Islamist militias that form a quasi-army. But a third of the men in these groups will refuse to drop their guns and come under the authority of the new security forces, reckons Hasham Bisher, who heads Tripoli’s SSC. Islamists in particular are loth to disband, fearing they may then be suppressed, as they were under Qaddafi.

So the government’s ability to keep law and order outside Tripoli is weak—“and arguably within it too,” says Claudia Gazzini of International Crisis Group, a Brussels-based think-tank. The starkest illustration of this is the authorities’ inability to end the blockade that has reduced oil exports, the government’s main source of revenue, to under a tenth of the 1.6m barrels a day produced before the uprising. Some factions appear to be trying to sell oil to fund a campaign for federalism, with Benghazi as the capital of an autonomous eastern region. Others are protesting against the government’s general incompetence.

Both the General National Congress, a proto-parliament elected last year, and the government that it endorsed have been hamstrung. In last year’s election to the congress, the National Forces Alliance, a bunch of liberal-minded Islamists (in the absence of almost any pure secularists), won the most votes. But many of the congress’s independent members clubbed together to support the Justice and Construction Party, a Libyan vehicle for the Muslim Brotherhood, plus a clutch of other Islamists. This more Islamist-minded faction of the congress further strengthened its clout thanks to an “isolation law” passed in May under pressure from militiamen surrounding ministries, who insisted that anyone who had a senior post under Qaddafi should be disqualified from public office. The National Forces Alliance, which included several such figures with valuable experience, recently walked out, leaving the Islamists in control.

Tensions have risen still higher since Ali Zidan, the embattled prime minister who has been supported by the relative liberals, had a friendly meeting with General Abdel Fattah al-Sisi, Egypt’s military chief who oversaw the fall of Muhammad Morsi, the Muslim Brother who had been Egypt’s president for the past year. The Libyans’ Justice and Construction Party is now calling for Mr Zidan to resign.

The Islamists now vilify members of more liberal parties as azlam, “remnants” of Qaddafi’s regime, who in turn have begun to denounce anyone close to the Brotherhood and its Islamist allies as “extremists”. An assembly to draft the constitution has yet to be elected. Women and ethnic minorities, such as Berbers, are still underrepresented.

The long-neglected east is the most troubled part of the country. The more secular Libyans tend to blame Islamists for the almost daily assassinations but eastern federalists and secessionists also make trouble. Ansar al-Sharia, a group of jihadists who were evicted from Benghazi after the American ambassador was murdered there a year ago, have started to creep back in, wooing locals by providing services such as clinics. They have also set up bases in Ajdabiya, between Tripoli and Benghazi, and have fought battles in Sirte, Qaddafi’s home town. Government-aligned forces are loth to crack down on them for fear of being likened to Qaddafi’s. The government dissolved some Libyan Shield forces after they used anti-aircraft guns to break up protests in Benghazi in June, leaving 30-odd people dead.

Foreign investors, who were lauding Libya a year ago as the next frontier, have been staying away. Cranes stand idle as contracts have yet to be sewn up. One company estimates that it will have to pay another $2m on top of a contract worth $25m to ensure security.

Not everyone has given up hope. Tribes in the east have prevented their area from getting entirely out of hand. Town councils here and there are doing a fair job of running local services, including hospitals and schools. “We don’t need to wait for the government to make decisions or give us money,” says Jibril Raeed, a councillor in Misrata, a famously independent-minded town east of Tripoli, one of several places where councils are building institutions from the ground up. A whip-round among the city’s businessmen raised funds to revamp the main street and build a new arrivals hall at the airport.

Most Libyans seem to think a basic social consensus will stop the country falling apart entirely, even if it is far from becoming the modern state they had hoped for. Some even think the oil disputes may force the government and its opponents to seek a compromise that could end the infighting. Voices calling for a national dialogue have been growing louder. “I hope the current troubles is the fever a patient has just before his condition improves,” says a diplomat in Benghazi.