Forces loyal to Libyan leader Colonel Muammar Gaddafi have tried but failed to retake the rebel-held city closest to the capital, Tripoli.
Witnesses said pro-Gaddafi troops, supported by tanks and anti-aircraft guns, tried to retake Zawiya in six hours of fighting on Monday night, attacking rebel positions from six directions.
They said the rebels managed to push back the attackers.
Zawiya is 30 miles (50km) west of Tripoli.
“We will not give up Zawiya at any price,” said one witness.
Col Gaddafi, Libya’s ruler of 41 years, has already lost control of the eastern half of the country since protests demanding his resignation began two weeks ago. He still holds the capital.