(Adds details, reporting from scene)
* Six hour battle takes rebels close to coast
* Push for government-held Zawiyah gains pace
By Michael Georgy
NORTH OF BIR SHUAIB, Libya, Aug 13 Rebels in western Libyan advanced north to within 25 km (15 miles) of the coastal city of Zawiyah on Saturday after fighting a six-hour battle with pro-Gaddafi forces, Reuters journalists at the scene reported.
Rebel fighters pushed government troops back about 7 km from their previous positions, fixing a front line about 5 km north of the village of Bir Shuaib, near a diaper factory.
They set up a checkpoint on the road there and about 150 fighters gathered, some firing weapons in the air to celebrate their advance.
Rebels said it had been a heavy battle, with pro-Gaddafi forces using anti-tank guns. A medic said three rebel fighters were wounded in the battle, but none were killed.
Rebels advancing from the mountains southwest of the capital hope to reach Zawiyah, cutting off the coastal highway to Tunisia that links Tripoli with the outside world, and putting unprecedented pressure on Gaddafi's bastion in the capital.
Government troops withdrew after six hours of fighting, the rebels said.
"God willing, we will be attacking Zawiyah in one or two days," said rebel commander Mokhtar Lakdar.
"We are hoping to go to Zawiyah soon," said 17-year-old fighter Mohammed Al-Riffi. "We are just waiting for help from NATO and more ammunition."
Judging by impact craters, wrecked buildings and burnt-out tanks, warplanes of the western alliance have bombed and rocketed government military targets on the route of the rebel advance over the past week, providing close air support.
Zawiyah is the home town of many of the rebels battling on the western front. It has staged two uprisings against Gaddafi since March but remains in government hands along with its refinery and harbour on the Mediterranean coast.
Gaddafi's deputy foreign minister Khaled Kaim on Friday said the rebels could not take Zawiyah. A captured Libyan intelligence officer told Reuters the army had reinforced its garrison in the town and was ready for a fight.
Mahmoud Al-Rivavi, 32, a former shopkeeper turned fighter said "Gaddafi's men are about 5 km ahead".
"We went on a patrol a short while ago and they shot at us so we were told to come back, but we hope to make it to Zawiyah soon," he added.
Government forces had fortified their position at Bir Shuaib with about 10 two-tonne concrete barriers and sand berms. Scattered around were two green blankets, tarpaulin for a tent, a packet of marmalade and some grapes.
Left by the berm was a portait of Gaddafi with the words: "Leader of the world."
A copy of Gaddafi's Green Book -- his work setting out his views on government and philosophy -- lay nearby. The pages of the book had been torn out by someone, leaving only the cardboard covers.
Pamphlets from pro-government Muslim clerics, criticising the rebels, had also been left behind by the retreating troops. (Editing by Douglas Hamilton and Peter Graff)
Our top photos from the last 24 hours.