The speed with which this city on Tripoli's doorstep fell to Libyans calling for Moammar Gadhafi's ouster raised hopes a rebellion in the east could spread.
Less than two weeks later, Zawiya is firmly back in the regime's grasp after a brutal assault against the protesters-turned-rebels cornered in the main square.
The battle for Zawiya was a key test of strength for both sides. Sandwiched between Gadhafi strongholds, Tripoli to the east and Serman and Sabratha to the west, the rebels ultimately were isolated and outgunned by members of an elite brigade commanded by the ruler's son, Khamis.
Zawiya's fall leaves the country divided into a pro-Gadhafi west and the rebel-held east, pushing the North African nation ever closer to civil war.
It started with largely peaceful demonstrations, emboldened by successful uprisings in Egypt and Tunisia as well as growing momentum by rebels in the east.
Protesters _ including government employees, teachers, lawyers and accountants _ marched to Martyrs' Square and camped at the main mosque. They also set fire to police stations and the offices of Gadhafi's revolutionary committees.
The police chief joined the rebels after refusing to open fire on the people, then several army officers defected to their side, helping to protect the city
Videos posted by opposition groups on Facebook on Feb. 23 showed scores of anti-government protesters raising the pre-Gadhafi flag on a building in Zawiya, which is located 30 miles (50 kilometers) west of Tripoli, near a key oil port and refineries on the Mediterranean.
The footage couldn't be independently confirmed, but the city quickly became a key battle zone because of its proximity to the capital as the North African nation veered toward civil war.
The next day an army unit fired automatic weapons and an anti-aircraft gun at a mosque being used by protesters near the square, killing several people. A witness said the attack occurred after Gadhafi sent an envoy to the city with a warning: "Either leave or you will see a massacre."
Gadhafi later addressed the people of Zawiya in a rambling speech delivered over the phone on state TV. He expressed condolences for the dead but then angrily scolded the city's residents for backing the uprising.
He blamed the revolt on bin Laden and teenagers hopped up on hallucinogenic pills given to them "in their coffee with milk, like Nescafe."
But the attack only stoked the protesters' anger, with thousands defiantly massing on Zawiya's square to demand that Gadhafi step down. Many armed themselves with hunting rifles, others set off explosives normally used to hunt whales and fish in the sea while rebel commanders manned tanks and anti-aircraft guns stationed at the entrances of the city.
The standoff continued for days with Gadhafi's forces massed on the city's outskirts and the rebels treating their injured at a makeshift clinic at the mosque while maintaining control of the central square.
The mood in the city was upbeat on Feb. 27 when foreign journalists were taken in by government escorts in a failed attempt to show the regime had control. Instead, rebels were passing out sweets in celebration after repelling a series of attacks.
But then the so-called Khamis Brigade unleashed all its firepower and stormed the city from three sides. Communications were cut, making it nearly impossible to reach rebels and residents from outside.
The city sank into darkness at night due to power outages and the main hospital became too dangerous for patients because it was under the control of government forces.
A member of the Libyan opposition-in-exile, Salem Ganu, said most families had fled the city and sought refuge in mosques and farmland on the outskirts, leaving a few hundred rebels to battle it out with Gadhafi's forces.
"The square has been totally devastated and demolished," he said in a telephone interview from London. "There are tanks for Gadhafi's militia stationed there. I don't know how many but they can't move from the square because the rebels control the side streets."
After days of relentless shelling and street battles, Gadhafi's regime claimed victory on Wednesday. Even then, government spokesman Moussa Ibrahim told foreign journalists they wouldn't be allowed into the city because there were still some "pockets" of fighters.
Tanks lined the street leading to the city square and the bulldozer that had been used as a barricade by the rebels was gone. Women waved green flags from their balconies and pro-Gadhafi demonstrators had replaced the rebels on the square, protected by snipers on rooftops. Anti-Gadhafi graffiti was painted over.
The ill-equipped rebels were forced into armed confrontation too soon and found themselves overwhelmed by Gadhafi's superior firepower.
With their counterparts in the east on the defense, Zawiya's anti-Gadhafi forces were left to fend for themselves. They lost their balance after their commander Col. Hussein Darbouk, was killed on March 4, along with at least 18 others, marking the beginning of the end. Darbouk was a colonel in Gadhafi's army who defected along with other troops in Zawiya early in the uprising.
The devastation in Zawiya was widespread. Windows of surrounding buildings were shattered and walls pockmarked from bullets and shrapnel.
The mosque was demolished and the floor left covered with rubble, shoes and glass. Only empty book shelves, a prayer rug and a white pillow on which a rebel had sat during an interview with The Associated Press during the earlier visit remained intact. A clock was stopped at 10:00.
A mass grave where the rebels had buried their dead had been flattened _ some residents said the bodies had been cleared away with bulldozers, although that couldn't be confirmed.
Empty cases of ammunition, helmets and sand bags were piled up in front of a three-story building that had been devastated. A new hotel overlooking the square also had been destroyed and a sign calling it the Jawhara had been wrecked.
Many water pipes were leaking.
The rebels had vanished.
"I don't know where the rebels are," a 43-year-old resident told the AP during a government-sponsored trip to show off its victory. "Where did they go? I have no idea."
Gamel reported from Cairo.