BIR SHAEB, Libya -- Libyan rebels fought their way into the strategic city of Zawiya west of Tripoli on Saturday in their most significant advance in months, battling snipers on rooftops and heavy shelling from Muammar Qaddafi's forces holding the city.
Zawiya, 30 miles (50 kilometers) from the capital, is a key target for rebels waging a new offensive launched from the mountains in the far west of Libya, an attempt to break the deadlock in combat between the two sides that has held for months in the center and east of the country.
A credible threat from the rebels in the west could strain Qaddafi's troops, which have been hammered for months by NATO airstrikes. Defending Zawiya is key for the regime but could require bringing in better trained forces who are currently ensuring its hold over its Tripoli stronghold or fighting rebels on fronts further east.
A group of about 200 exuberant rebel fighters, advancing from the south, reached a bridge on Zawiya's southwestern outskirts, and some rebels pushed farther into the city's central main square. They tore down the green flag of Qaddafi's regime from a mosque minaret and put up two rebel flags. An Associated Press reporter traveling with the rebels saw hundreds of residents rush into the streets, greeting the fighters with chants of "God is great."
Qaddafi's forces then counterattacked, unleashing rounds of heavy shelling and gunfire could be heard as rebels and government troops battled.
Regime snipers were firing down from rooftops on the rebels, said one resident, Abdel-Basset Abu Riyak, who joined to fight alongside the rebels when they entered the city. He said Qaddafi's forces were holed up in several pockets in the city and that there were reports of reinforcements coming from Tripoli, though there was no sign of them yet. He said NATO airstrikes had hit Libyan military positions near the city the night before.
Zawiya's residents rose up and threw off regime control when Libya's anti-Qaddafi revolt first began in February. But Qaddafi's forces retaliated and crushed opposition in the city in a long and bloody siege in March. Many of Zawiya's rebels fled into the mountains -- and were among the lead forces advancing on the city Saturday -- while others like Abu Riyak remained in the city, lying low.
Speaking to the AP by telephone, Abu Riyak said residents were now joining up with the rebels' assault, saying, "95 percent of Zawiya's people are with the revolution."
"There is shooting from all sides," said another rebel, 23-year-old Ibrahim Akram. "The people joined us. Fierce clashes are still ongoing, but thank God our numbers are great."
But Qaddafi is likely to fight hard to keep control of Zawiya. The city of about 200,000 people on the Mediterranean coast is key because it controls the main supply road to the capital from the Tunisian border and is the site of the sole remaining oil refineries in the west still under the regime's control.
The state of government forces after months of punishing NATO airstrikes is not known. The best armed and equipped units, led by Qaddafi's sons, have been involved in fighting at the main fronts -- around the city of Misrata, east of Tripoli, and at the oil port of Brega in the center of the country.
Government spokeman Moussa Ibrahim dismissed reports of rebel advance on Zawiya as a "media game," dismissing it as the act of "remnants of armed gangs." He told state TV that "Tripoli is secure and safe. Even if there is advancement by the armed gangs, it's only temporary under the cover of NATO."
The rebel force has been advancing into the coastal plain for the past week from the Nafusa Mountains, an opposition stronghold about 60 miles to the south. Commanders have said the plan is to seize Zawiya and other nearby towns and then move on Tripoli itself, Qaddafi's stronghold.
At the same time, rebels were attempting to seize control of another strategic town, Gharyan, south of Tripoli.
In the morning Saturday, rebels claimed control of Gharyan, saying they had moved into the center of the town and that Qaddafi's troops had withdrawn. But several hours later, regime forces returned with reinforcements and the two sides clashed, said rebel spokesman Gomma Ibrahim.
Gharyan lies at the northern end of the Nafusa Mountains, and Qaddafi's hold on the town had been a sticking point for rebels who have taken control of most of the range. The town lies on the main road leading directly from Nafusa to Tripoli, 50 miles to the north on the coast.
Saturday's initial foray into Zawiya appeared hasty, with a band of enthusiastic rebels pushing to the main square while the main force remained on the outskirts. Still, the rebels appear to have learned from the main mistakes from the fronts further east, where the untrained citizen fighters were long on enthusiasm and short on skill.
But during this week's advance in the west, rebels were more cautious. On a main highway headed to Zawiya, rebels set up a rear position at a key intersection by erecting an earthen wall across the road, manned by a tank, to fall back to if necessary. That was a contrast to past battles in the east, where fighters would charge ahead in furious advances, then retreat pell-mell when hit by Qaddafi's artillery and rockets.
Libya's revolt began in February, with the rebels quickly wresting control of much of the eastern half of the country, as well as pockets in the west.
But since April, the conflict has been locked in a stalemate. Despite months of NATO airstrikes hitting regime forces, rebels have failed to budge the main front lines, particularly at the oil port of Brega.
Rebels were claiming some progress at Brega, saying they seized part of the residential zones around its oil terminal. The Benghazi-based rebels' military spokesman, Col. Ahmed Bani, said that rebel fighters are clashing with Qaddafi forces to take control over the rest of the town.
"Very soon all Brega will be liberated," he said.