By Maria Golovnina and Mohammed Abbas
ZAWIYAH/RAS LANUF, Libya (Reuters) - Libyan government forces encircled the western town of Zawiyah on Saturday after rebels drove them out in fierce fighting, while in the east, opponents of Muammar Gaddafi pushed toward his home town.
Gaddafi's forces entered Zawiyah at 6 a.m. (11 p.m. EST on Friday) with hundreds of soldiers with tanks, said Youssef Shagan, the rebel force spokesman in the town, 50 km (30 miles) west of the capital Tripoli.
"Our people fought back ... We have won for now and civilians are gathering in the square," he said.
The rebels said a counter-attack could come soon.
People opposed to Gaddafi's 41-year rule have been fighting his forces in Zawiyah for more than a week, after rebels took over swathes of eastern Libya in an uprising inspired by the overthrow of veteran rulers in Egypt and Tunisia this year.
Shagan said Gaddafi forces had fired high explosive rounds in central streets and dragged people from their homes. There were many casualties among civilians, rebels and soldiers, he said, although he could not give a precise number.
"We captured 3 APCs, two tanks and one pick-up after an hour and a half of fighting," he said, adding that government snipers had taken up positions in Zawiyah.
By mid-morning, Gaddafi's forces had regrouped and were manning checkpoints some 3 km (1.8 miles) from the center, where a rebel fighter vowed to fight to the death.
"Gaddafi will never enter this city. He will never set foot here. The only way for him to enter the city is when we are all dead. He has to kill us all to control the city," the rebel, who gave his name as Ibrahim, said by telephone.
Rebels in eastern Libya said they were pushing further west after driving out forces loyal to Gaddafi from the oil town of Ras Lanuf on Friday. They said they had fired on an army helicopter swooping over Ras Lanuf on Saturday.
Doctors said at least 26 people had died in Friday's fighting around Ras Lanuf and what rebels said was an attack by Gaddafi's forces on an arms store on the edge of the eastern town of Benghazi, where the uprising began in mid-February.
In Zawiyah, a reporter for Britain's Sky news said a makeshift hospital set up in a mosque was overwhelmed. She said Gaddafi forces near the hospital were firing on ambulances.
Rebel fighters said they had taken the town of Bin Jawad some 525 km east of Tripoli and were moving on toward Sirte, Gaddafi's heavily guarded home town.
There was no sign of Gaddafi's forces or rebels in Bin Jawad on Saturday morning. Some rebels said they had sent reconnaissance missions there, while the main rebel force massed in Ras Lanuf to move ahead.
The latest fighting suggested front lines between government forces and the rebels, who are fighting with everything from captured tanks to sticks, were far from clear and could shift quickly.
The rebel flag waved over a major roundabout in Ras Lanuf on Saturday and there was no sign of pro-Gaddafi soldiers, although the government had denied the rebel claim on Friday to be in control of the town, 660 km east of Tripoli.
At the entrance to the town, half a dozen soldiers manned a rebel checkpoint. Asked if rebels were in charge of the whole town, one soldier replied: "Everything, 100 percent, it is completely safe."
A day earlier, flashes and thuds had resounded from fighting around Ras Lanuf, an oil terminal of the OPEC producer that sits on the Mediterranean coast. Helicopters had strafed positions of rebels, who fired rifles back.
On Saturday the offices of the Harouge Oil Operations, a key oil terminal, were abandoned and rebels commandeered vehicles.
"Gaddafi stole from the people and now the people are taking it back," said one armed looter, Nasr al-Abdili, who was taking a pick-up truck.
The streets were calm, with people queuing for bread.
"It's not a normal situation, but you have to be prepared for this situation. I am very pleased, we all are. We are finished with Gaddafi," said Saleh Mohamed, 37, who works as an administrator in an oil firm.
The revolt is the bloodiest yet against long-entrenched rulers in the Middle East and North Africa.
News of the fighting took U.S. crude prices to their highest levels since September 2008, and Brent crude futures for April delivery closed at $115.97 a barrel on Friday, up $1.18.
The International Energy Agency said the revolt had blocked about 60 percent of Libya's 1.6 million bpd (barrels per day) oil output. [ID:nWEB3662] The loss, due largely to the flight of thousands of foreign oil workers, will batter the economy.
Libyan crude exports were set to slide in the coming days. "You now have a situation where everything is pointing toward a more or less complete shutdown of Libyan production," said Samuel Ciszuk, a senior analyst with IHS Energy.
The upheaval has caused a humanitarian emergency on the Tunisian border, where tens of thousands of foreign workers have fled to safety. An international airlift is under way, reducing the number of refugees stranded in tented camps.
Western leaders have urged Gaddafi to go and are considering various options including the imposition of a no-fly zone, but are wary about involving their militaries after wars in Afghanistan and Iraq that were deeply unpopular at home.
Mustafa Gheriani, a spokesman for the rebel February 17th coalition, told Reuters in Benghazi the international community seemed to be waiting to see who would get the upper hand.
"It's about who can hold his breath under the water longest and I think it will be us," he said.
(Additional reporting by Michael Georgy in Tripoli; writing by Philippa Fletcher; editing by Mark Trevelyan)