Heavy fighting has forced the shutdown of one of Libya's biggest refineries on the edge of the flashpoint town of Zawiyah 50 km (30 miles) west of Tripoli, a refinery official said on Wednesday.
"Heavy weapons have been fired nearby and we can't run the refinery under these conditions," the official told Reuters.
The Zawiyah refinery is the biggest provider of gasoline for cars in Libya, and has a total capacity of 120,000 barrels per day. The refinery has been operating at 70 percent capacity for the past two weeks.
The official said he planned to open the refinery later on Wednesday but it was not clear whether it would be possible.
Any sustained shutdowns at the refinery in the city of 250,000 could add to instability in Libya as government forces try to crush rebels determined to topple the country's leader Muammar Gaddafi.
Zawiyah was, briefly, described as a rebel stronghold in the uprising which erupted against Gaddafi last month. But it may now be on the verge of changing hands.