TRIPOLI, Libya — In the end, it was more of a Sunday drive than a punishing final offensive.

From the first cautious ventures out of the hard-fought prize of Zawiyah, the rebels’ advance became a headlong rush into the heart of Tripoli and Green Square, the symbol of Col. Muammar el-Qaddafi’s power. By nightfall, the rebels were in command of the square, the scene of so many manic, forced declarations of fealty to Colonel Qaddafi. Now, the portraits were ripped down, along with the green flags that marked his rule. Instead, young men waved rebel flags in the renamed Martyrs’ Square.

By 2:30 a.m. Monday, a wary quiet had taken hold. Rebel fighters secured the entrances to the square and staffed checkpoints in parts of the capital. There were small, ecstatic gatherings, but there were also long, silent streets in a city of frayed nerves, and rumors of roving government soldiers and snipers everywhere. After their speedy advance, the rebels’ hold on parts of central Tripoli seemed evident but also tenuous.

Bullets ricocheted here and there, and sounds of gunfights erupted sporadically but faded by the early morning. The road from Zawiyah to Tripoli was jammed with hundreds of cars, many with fighters aboard, in what looked like a move to further secure the city.

Sunday began with the sound of rockets. The roar subsided as the rebels moved beyond Zawiyah, a city that had taken days of heavy fighting to win back from the Qaddafi forces. But each time, the fighters found it a temporary jolt rather than a protracted battle.