TRIPOLI, Libya – Libyan leader Moammar Gadhafi’s four-decade-long rule over Libya was crumbling at breakneck speed Sunday as hundreds of rebel fighters swept toward the heart of Tripoli, and dissidents said they had secured control of many parts of the capital.

With rebel leaders saying that Gadhafi’s compound was surrounded, that his son had been captured and that his presidential guard had surrendered, the six-month-old battle for control of Libya appeared to be hurtling toward a dramatic finale.

By early this morning, opposition flags were fluttering over buildings across the capital, and rebels were firmly in control of the symbolically significant Green Square in the heart of the city. In a brief broadcast on state television, Gadhafi made what came across as a desperate plea for support. “Go out and take your weapons,” the Libyan leader said.

The rebel advance unfolded with surprising speed throughout the day as fighters converged on the capital from three directions. In areas under rebel control, thousands of people poured onto the streets to celebrate, stomping on posters of Gadhafi, setting off fireworks and honking horns.

With communications to the capital sporadic and some journalists confined to their hotel, rebel claims could not be confirmed, and experts cautioned that a tough urban battle may yet lie ahead between the lightly armed and untrained rebels and the elite government forces kept in reserve for the defense of the capital.

But reporters traveling with rebel forces said Gadhafi’s defenses were melting away faster than had been expected, with reports of entire units fleeing as rebels entered the capital from the south, east and west, and his supporters inside the city tearing off their uniforms, throwing down their weapons and trying to blend into the population.

A Tripoli-based activist said the rebels had secured the seaport, where several hundred reinforcements for the opposition had arrived by boat, and were in the process of evicting Gadhafi loyalists from the Mitiga air base on the eastern edge of the city.

“The Gadhafi regime is clearly crumbling,” said a statement issued by NATO, whose five-month-old aerial bombing campaign, ostensibly launched to protect civilians, contributed enormously to the erosion of government defenses. A U.S. official in Washington who was monitoring the intelligence from Libya said that the situation in Tripoli was fluid but that Gadhafi and his hard-core loyalists did not appear likely to give up easily.

In the rebel capital, Benghazi, where huge crowds gathered to celebrate what they hoped was the imminent capture of Tripoli, Transitional National Council leader Mustafa Abdel Jalil announced that Gadhafi’s son Saif al-Islam had been captured.

There was no indication as to Gadhafi’s whereabouts, although he had issued a defiant speech earlier in the day in which he insisted he was in Tripoli and would not surrender. “We cannot go back until the last drop of our blood. We will defend the city. I am here with you,” he said in the audio statement, purportedly broadcast live. “Go on, go forward!”

But it appeared that his control had already unraveled as the rebels swept into the capital, encountering only pockets of resistance along the way.

After consolidating control of the strategic western town of Zawiyah on Thursday, the rebels pushed rapidly east throughout the day, capturing a major military base that was home to the Khamis Brigade, an elite force led by Khamis Gadhafi, another of the Libyan leader’s sons.

Exultant rebels seized weapons from the base and were seen carrying away boxes of brand-new Belgian munitions, as others raced by in trucks filled to the brim with other weaponry.

By nightfall, the rebel force had reached suburban Janzour, where witnesses said government forces had abandoned their posts earlier in the day. And rebels advancing along the eastern coastal highway were reported to have linked up with opposition fighters in the strategically located eastern suburb of Tajura, long a stronghold of opposition to Gadhafi, effectively cutting off the capital.

In a late-night briefing for journalists, government spokesman Moussa Ibrahim said that at least 1,300 people had been killed since noon, in addition to 930 the previous day, and blamed NATO for the bloodshed. The figures could not be independently confirmed, and although rebels said there had been many deaths, they did not believe the number was that high.