Libyan rebels have fought off an attempt by Muammar Gaddafi's troops to retake a key oil town in a day-long battle.

The assault on the port of Brega was the first major counter-offensive against the opposition-held eastern half of Libya.

For the past week, pro-Gaddafi forces have been focusing on the west, securing his stronghold in the capital Tripoli and trying to take back nearby rebel-held cities with only mixed success.

But the assault on Brega appeared to stumble. Gaddafi's forces initially recaptured the oil facilities. Then a wave of opposition citizen militia drove them out again, cornering them in a nearby university campus where they battled for several hours until they fled.

In Tripoli Gaddafi made another ranting state TV appearance and vowed: "We will fight until the last man and woman."

He lashed out against Europe and the United States for their pressure on him to step down, warning that thousands of Libyans would die if US or Nato forces intervene.

The United States is moving naval and air forces closer to Libyan shores and is calling for Gaddafi to give up power immediately.

The US, Britain and other Nato countries are drawing up contingency plans to impose a no-fly zone over Libya to prevent Gaddafi's planes from striking rebels.

"We will not accept an intervention like that of the Italians that lasted decades," Gaddafi said, referring to Italy's colonial rule early in the 20th Century.

"We will not accept a similar American intervention. This will lead to a bloody war and thousands of Libyans will die if America and Nato enter Libya."

In Ajdabiya, people geared up to defend the city, fearing Gaddafi's forces would move on them next. At the gates of the city, hundreds of residents took up positions on the road from Brega, armed with Kalashnikovs and hunting rifles, along with a few rocket-propelled grenade launchers. They set up two large rocket launchers and an anti-aircraft gun in the road. But by the evening, there was no sign of attack there.

Brega and nearby Ajdabiya are the farthest west points in the large contiguous swathe of eastern Libya extending all the way to the Egyptian border that fell into opposition hands in the uprising that began on February 15. Ajdabiya is about 90 miles from Benghazi, Libya's second largest city and the nerve centre of the opposition.

Brega is the second-largest oil and gas complex in Libya. Amid the turmoil, exports from its ports have all but stopped with no ships coming to load up with crude and natural gas. Crude production in the south-eastern oil fields that feed into the facility has been scaled back because storage facilities at Brega were filling up.

Gaddafi's regime has been left in control of Libya's north-west corner, centred on Tripoli, but even there several cities have fallen into rebel hands after residents rose up in protests, backed by mutinous army units and drove out Gaddafi loyalists.

In recent days, loyalists succeeded in regaining two of those towns - Gharyan, a strategic town in the Nafusa mountains south of Tripoli, and Sabratha, a small town west of the capital.

But opposition fighters successfully repulsed attacks by pro-Gaddafi forces on several others: the key city of Zawiya outside the capital; Misrata, Libya's third largest city east of Tripoli; and Zintan, a town further south-west in the Nafusa mountains.

The regime may be bringing in more forces from regions it still dominates in the sparsely populated deserts in the south-west.

In his speech today, Gaddafi lashed out at international moves against his regime, including the freezing of his and other Libyan assets abroad - an act he called "piracy" - and efforts by Europe to send aid to opposition-held Benghazi.

He said any Libyan who accepts international aid was guilty of "high treason" because it "opens Libya to colonialism."

In a pointed message to Europe, he warned, "There will be no stability in the Mediterranean if there is no stability in Libya."

"Africans will march to Europe without anyone to stop them. The Mediterranean will become a centre for piracy like Somalia," he said.

Gaddafi has worked closely with Italy and other European countries to stop African migrants who use Libya as a launching point to slip into Europe.

He also threatened to bring in Chinese and Indian companies to replace Western companies in Libya's oil sector if the West keeps up its pressure on him. European firms are heavily involved in Libya's oil production.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.