Jubilant rebel fighters overran the seat of power of the fugitive Libyan leader Moammar Gaddafi on Tuesday, swarming into his fortified Bab al-Aziziya compound in Tripoli and heralding the symbolic end of his four-decade rule over Libya.

Gaddafi’s whereabouts were unknown, and loyalist forces continued to put up stiff resistance in scattered areas around the capital. As night fell, his fighters unleashed volleys of artillery onto the city and battles raged near the airport, muting the celebratory mood and sending some revelers rushing indoors for cover.

At least two major towns as well as numerous smaller ones remained under Gaddafi’s control, and it was clear that more fighting lies ahead before the rebels can claim the whole country.

Ever defiant, Gaddafi vowed Wednesday to fight on “until victory or martyrdom” and called on residents of the Libyan capital and loyal tribesmen across the country to free Tripoli from the “devils and traitors” who have overrun it, the Associated Press reported.

In an address from an unknown location, Gaddafi asked: “Why are you letting them wreak havoc?” The speech was broadcast on a local radio station and reported by al-Orouba TV, a Syrian-based station owned by a Gaddafi supporter. Libyan state television, which formerly carried Gaddafi’s speeches, was taken over by the rebels Tuesday.

Al-Orouba TV earlier quoted Gaddafi as saying he had left the Bab al-Aziziya compound in a “tactical move.”

But with the breaching of the walls of the compound from which Gaddafi ruled unchallenged for most of the past 42 years, his stewardship of Libya seemed to be over, making him the third dictator to be toppled since Arabs across the region began to rise up against their rulers in January.

This was also the first outright regime change of the Arab Spring. Although people power forced Egypt’s Hosni Mubarak and Tunisia’s Zine el-Abidine Ben Ali to step down, their regimes remained largely intact, with military leaders from the old order stepping in to oversee the transition to a still-undefined new one.

Never before has the Arab world witnessed a rebel army overrun a ruler’s home and power base in scenes that unfolded live on television — eventually on multiple channels but first on al-Jazeera, which has played a key role throughout the Arab revolts.

Footage showed rebel fighters waving from the shell of a house bombed by U.S. warplanes in 1986, which Gaddafi had preserved as a monument to his own survival, and clambering onto a bronze sculpture of Gaddafi’s fist clutching an F-16 fighter jet, a work commissioned to commemorate the attack.

The rebels also swarmed through the extensive grounds where Gaddafi until recently had kept camels and where his supporters gathered throughout the NATO bombing campaign to serve as human shields for their leader.

There was no sign of Gaddafi, and many Libyans suspect that he may have long ago moved out of the walled compound, which has been a frequent target of NATO attacks.

Throughout the day, concerns were growing for the safety of journalists still trapped under fire at the Rixos hotel nearby.

Though Gaddafi was not there, the compound was undeniably his power base, relatively modest by the standards of most Arab leaders but bursting with the eccentricities that characterized his rule. The tent in which he received visiting dignitaries was erected on the lawn. He delivered his first defiant speech of the uprising from the bombed house, and state TV regularly broadcast footage of him driving himself through the grounds in his golf cart.

The spectacle will give pause to other Arab leaders still hoping to withstand the clamor for change that has swept the region for the past eight months, notably Syrian President Bashar al-Assad, whose brutality rivals that of Gaddafi and who has deployed tanks and troops in an attempt to crush a five-month-old revolt by unarmed protesters against his rule.

But in Libya, attention was already switching to the post-Gaddafi era and the urgent need to establish a new administration to replace the one in flight.

“We have to now begin for the transitional period immediately,” Mahmoud Jibril, the foreign affairs minister for the Benghazi-based Transitional National Council, the de facto rebel government, said at a news conference in the Qatari capital, Doha. He said preparations were underway to set up a security council that would gather together rebels from their three main locations.

Meanwhile, key ministers of the Transitional National Council left Benghazi late Tuesday and headed to the town of Zintan, about 100 miles southwest of Tripoli, to establish a first toehold for the eastern-based rebel leadership in the western part of the country, according to Suleiman Foutiya, a council member in Benghazi.

Rebels were also making rapid progress along the coastal highway in the east, breaking out from Brega, the town they seized Monday, and reaching the oil center of Ras Lanuf, according to a rebel army spokesman, Col. Ahmed Bani.

Gaddafi forces were in full retreat, he said, toward Sirte, the heavily guarded bastion of Gad­dafi support that could present the rebels with their biggest military challenge yet.

Bani said, however, that tribal leaders there had reached out to the opposition for a truce and that another Gaddafi stronghold, the desert town of Sabha in the south, had risen up. The claims could not be confirmed.

A NATO official who was not authorized to speak publicly said that surveillance imagery offered no indications that Gaddafi supporters were massing anywhere in the country for a major new offensive. Though firefights continue in some areas, “we’re not seeing large military formations of the kind that were guarding key points, which suggests that we’re getting pretty close to the end,” he said.

“It’s just a question of time for the opposition to take full control of all the major parts of Tripoli. Once they’ve done that, then it’s basically done,” the official said.

At a meeting in Brussels on Tuesday, he said, allied officials discussed the indicators that would suggest that NATO support was no longer needed, including the complete dispersal of government forces; knowledge of Gaddafi’s location, if not necessarily his capture; the safety of civilians; and the beginnings of new government control over the capital.

In Washington, the Obama administration announced plans to release up to $1.5 billion in frozen Libyan funds to the rebel opposition, which has been complaining for months about slow progress in freeing the estimated $30 billion in Libyan assets held in the United States and frozen by U.N. sanctions against Gaddafi’s government.

The money will be earmarked for restoring services and helping set up a government in Tripoli, administration officials said.

The storming of the compound followed 24 hours of confusion during which rebel claims to control most of the capital were called into doubt by the retreat of many fighters under fire from Gaddafi snipers. The appearance of Gaddafi’s son Saif al-Islam at the Rixos hotel made it clear that rebel claims to have captured him were false.

But on Tuesday afternoon, the rebels surged toward the compound, preparing for a final assault, clapping to the rhythm of the thuds of machine-gun fire and shouting, “God is great!”

About a mile away, however, the Western journalists who had been covering Tripoli remained pinned down under fire and prevented from leaving their hotel by the Gaddafi supporters keeping watch over them.

CNN correspondent Matthew Chance told the network that the journalists were “in a precarious position,” effectively held hostage by hostile gunmen and unaware of the dramatic events unfolding nearby.

Sly reported from Beirut. Correspondent Leila Fadel in Benghazi and staff writers Karen DeYoung and Joby Warrick in Washington contributed to this report.