Moammar Gaddafi ruled Libya for decades from behind the high walls and fantastically well-guarded steel gates of the Bab al-Aziziya compound. For most Libyans, the only glimpse inside came during the meticulously choreographed rallies that aired on state television.

But on Tuesday, NATO bombs and rebel bullets conspired to bring the walls tumbling down and yank the gates open wide. The compound that had been the inner sanctum of Gaddafi’s regime — a forbidden city at the heart of this seaside capital — became the setting for a rebel victory party and a prime opportunity to seize the spoils of a six-month-long war.

“This is freedom!” one man shouted as he emerged from the compound and squeezed the trigger of his freshly plundered assault rifle, unleashing fire skyward.

For the Libyans who have been battling Gaddafi since February, the conquest of Bab al-Aziziya on Tuesday marked the sweetest triumph to date. Gaddafi was nowhere to be found, but the most potent symbols of his reign were there, and they quickly became targets for desecration.

A golden bust of the Libyan leader was hoisted in the air as if it were a trophy, after the rebels had taken turns kicking it in the dust. A rebel truck — with an antiaircraft gun mounted on it — carted off a massive statue of a spread-winged eagle.

The fight to get inside the compound had been perilous, even after its defenses were weakened by precision-guided bombs dropped from NATO planes.

Earlier in the day, 20-year-old Tofiq Ghadda had stood aimlessly under an overpass near the winding entrance to Bab al-Aziziya, which means “splendid gate” in Arabic. The ragtag rebel forces were spraying the compound with bullets from heavy machine guns mounted on their trucks.

Others stood ready to move forward on foot, assault rifles primed to fire. But Ghadda, a student who sported fashionable shades, was empty-handed. “I want to fight, but nobody has given me a gun,” he said, disappointed.

Thunderous booms from mortar rounds, rockets and other explosives caused the rebels to press their hands to their ears. They ate cakes and drank fruit juice, even though it is the holy month of Ramadan, when Muslims are supposed to fast, provided they are not fighting a war.

Amid the bangs and the black smoke billowing out of the compound, there was constant fear of pro-Gaddafi snipers. Ambulances zipped past as the rebels clapped rhythmically to the beat of a heavy machine gun that fired repeatedly at what they said was a sniper holed up in a large concrete water tower.

Nobody harbored the illusion that Gaddafi was still inside the compound, with most speculating that he had taken refuge in one of the many tunnels that snake beneath the city. “He is a rat, and rats crawl underground,” said Lehadi Afshoot, 47, the deputy commander of a group of 80 rebels who had come down from the Nafusa Mountains in the west to join the fight.

But the absence of Gaddafi did little to dull the rebels’ enthusiasm when the compound’s defenses finally crumbled. Or the enthusiasm of average Tripoli residents.

By the thousands, men in cars, on scooters and even on bicycles flooded through the blasted-out gates. They walked wide-eyed onto the green meadow of the compound’s inner ring.

Tents, Gaddafi’s abode of choice, lay burned. Young men with long beards danced on the statue of a fist crushing a missile that Gaddafi had erected to commemorate the 1986 U.S. bombing of his compound.

Others, too busy to celebrate, set to work looting.

Ghadda, the previously unarmed student, balanced three Beretta pistols, a Kalashnikov assault rifle and a box of hand grenades in his arms. “I have weapons now!” he shouted cheerfully.

He was not the only one. Along the driveway leading away from the compound, just about everyone was leaving with something to show for the visit: brand-new Belgian sniper guns, golden pistols and lots of assault rifles.

“Welcome to the new Libya,” one man yelled, firing his pistol in the air. Others carried paintings, plasma television screens and a twin baby stroller.

“I should be so happy now, but I’m not,” said Khaled al-Ezromli, a doctor-turned-fighter. He said that he had been in several battles and that taking Gaddafi’s compound was supposed to be the final one.

But watching the looters, he said he feared that Libya was descending into chaos: “What will our future be now that everybody has a gun?”