Rebels blockading ports in the eastern province of Cyrenaica say they will form a breakaway state if government forces attack

Libyan government forces are poised to attack rebels blockading key oil ports this weekend in an offensive that risks splitting the country apart.

A deadline for rebels in the eastern province of Cyrenaica to hand over the ports, blockaded since last summer, has passed with the opposition still in control and vowing to form a breakaway state if attacked.

Rebel militias are dug in along Red Wadi, a valley preventing access along Libya's coastal highway to three blockaded ports. "The deadline is already over," said Osama Buera, a spokesman for the rebel Cyrenaica Political Bureau. "The central authorities in Tripoli are in a weak position. We still encourage a serious dialogue, otherwise we will just break away declaring the independence of new Cyrenaica."

Meanwhile, militias in the western mountain town of Zintan have cut one of Libya's last remaining pipelines, further choking production and leaving the government facing rebellion on two fronts.

The blockade, which has robbed the government of one of its only sources of revenue, is the most serious crisis Libya has faced since the overthrow of Muammar Gaddafi three years ago. It has left some observers predicting disaster. "Libya is teetering on the brink of failure," said Sarah Lean Whitson of Human Rights Watch.

Militias and tribes in both eastern and western oil-producing regions demand a bigger share of cash, echoing complaints that the economy is in chaos despite Libya having Africa's largest oil reserves.

Earlier this month, US special forces captured a renegade tanker off Cyprus after Cyrenaica rebels tried to sell oil independently. Washington insisted it supported the elected authorities.

The episode triggered a political crisis in Libya, with congress firing the prime minister, Ali Zeidan, and ordering the pro-government Libya Shield militias to mobilise. The two-week deadline set by the president of congress, Nur Abu Sahmain, for the ports to be unblocked or face attack expired on Friday.

Libya Shield militias led by forces from thecoastal city of Misrata are ready to attack, having already fought against rebels earlier this month. "The deadline has passed, they [the rebels] were supposed to hand the ports over." said Anwar Sawan, a Misrata community leader. "Weapons are the only resort if they don't hand them over."

With both sides mobilising, tension is high across Libya. Most international airlines, including British Airways, have suspended flights to Tripoli international airport, controlled by a Zintan militia, after rockets struck the runway. "We have no idea when the planes will be back. We will wait and see," said a travel agent at the half-empty airport

on Friday.

Nightly skirmishes between militias along the airport road have emptied the streets and left many fearful.

"Everyone is worried about the militias," said Abdullah Abdul Masen Bashir, the owner of Tripoli's most successful honey shop . Normally, his shelves would be groaning with the spring harvest from the eastern Green mountains, but the de facto frontline near the border of Cyrenaica has cut deliveries. "My shop should be full. It was a very good year. The conditions were right, just the amount of rain, but nothing has arrived," he said.

The Islamist-led congress is also under fire for having stayed in office beyond its original mandate, which expired last month. Opposition television stations now run a small icon showing a "red card" calling for parliament to be dissolved.

Strikes in refineries have caused petrol shortages in the capital and, with the country awash with weapons and lacking an effective police force, there has been a spate of high-profile bank robberies. BP this month became the latest major oil company to pull out of Libya.

Zeidan, who fled into exile after his dismissal, claiming his life was under threat, called this week for direct foreign intervention. "Any means to have security will be accepted in Libya. We should have forces that are part of the United Nations, regional or Middle Eastern troops," he told CNN.

Many citizens feel the same way, despairing of the worsening violence and the prospect of civil war. "We are becoming fractured because of the failure of the centre," said the Tripoli art historian Yousef Alkhaaki. "Without the intervention of the international community, we are doomed."

Diplomats say there is no appetite for the deployment of peacekeepers, although a dozen British army officers are in Tripoli preparing Libyan recruits for training next month at a base in Cambridgeshire.

Libyans are losing faith in democracy, after the failure of congress to tackle corruption, economic malaise and militia violence. Last month, just 500,000 voters, or 15% of the electorate, turned out to elect an assembly to write Libya's constitution.