Libya is facing its most critical moment since the ousting of Muammar Gaddafi with armed groups blockading oil fields and terminals, choking output to a 10th of normal levels and threatening economic disaster.

With the government forced to import fuel to keep power stations running and queues growing at petrol stations, the prime minister, Ali Zaidan, has repeatedly threatened to send troops to retake striking ports.

But the leader of rebels blockading ports in Cyrenaica, home to the bulk of Libya's oil, said such a move would be tantamount to a "declaration of war".

Ibrahim Ali Jathran, commander of troops who have defected to seize the terminals, warned his soldiers would fight back. "We will resist," he said.

The blockade has spread to western Libya, with the Elephant field on the Algerian border at a standstill and rebel oil guards further north around Zintan cutting pipelines.

Libyan oil workers protest in Tripoli against the closure of oil facilities. Photograph: Sabri Elmhedwi/EPA

The government controls just two oil ports, with production at about 160,000 barrels a day. The National Oil Corporation admits even this is guesswork, because its measuring gauges are broken, forcing officials to rely on dead reckoning.

Jathran insisted the strike was in reaction to what he said was a seizure of power – and oil revenues – by the Muslim Brotherhood in Tripoli.

"The Brotherhood has hijacked the state and parliament. It has infiltrated the oil ministry witharmed groups," he said.

Government officials deny the claim, saying the strikers are trying to sell oil themselves and are holding the country to ransom.

BP declined to comment on the situation in Libya but industry experts with close links to the company said it was keeping a watchful eye on the situation.

"The fact is BP do not really need to do anything currently as they have no real investments or personnel in the country yet," said one source. "The first sign of concern will be if they postpone drilling offshore. BP have said very publicly they planned to drill next year but they are likely to just put plans back, not announce a pull-out, like Shell."

Zaidan last week made good his threat to "bomb by air or sea" any tanker trying to buy oil direct from the rebels. TV footage released by the navy showed the crew of a patrol boat firing automatic weapons close to an empty Liberian-registered tanker as it approached the eastern coast.

That footage has made shippers nervous, and international oil companies are considering scaling down operations, with all eyes on BP, the largest exploration company left in Libya after Shell left last year.

The British petrol giant re-entered Libya in 2007, after a deal cemented by Tony Blair and Gaddafi, but the Arab spring and subsequent violence meant it has continually postponed drilling. Now some wonder if it will quit the country again.

"The bellwether is BP," said John Hamilton of London oil analysts CBI. "In terms of companies thinking about the future, BP is the biggest. If they go, everyone else is going to say that's a big signal."

The striking oil workers span a disparate range of causes, from more pay and regional spending to autonomy for Cyrenaica. But the common thread is exasperation with the failure of successive governments to revive a moribund economy despite bumper oil revenues. The government is, meanwhile, struggling to assert its control across much of the country amid an upsurge of intra-militia violence and jihadist bombings in the east.

Added to that is nervousness about the government's decision to spend 900m dinars (£450m) on the Libya Shield, a militia force garrisoning Tripoli, with many Libyans saying the money should go to regular police and army units.

"We are currently witnessing the collapse of state in Libya, and the country is getting closer to local wars for oil revenues," said Swiss oil analysts Petromatrix.

The blockade comes a fortnight before London hosts the biggest Libyan investment conference held since the end of the 2011 Arab spring.