Opposition fighters captured Gadhafi's son and one-time heir apparent, Seif al-Islam. The prosecutor at the International Criminal Court in the Netherlands said he would contact the rebels to discuss his handover for trial on charges of crimes against humanity.
Associated Press reporters with the rebels said the fighters rebels easily advanced 20 miles on Sunday from the west, took town after town - welcomed by residents - overwhelmed a major military base, then swept into the capital in a stunning turning of the tide in the 6-month-old Libyan civil war.
The fighters and Tripoli residents who support them flooded Green Square, shooting in the air in celebration, clapping and waving the rebels' tri-color flag, according to television footage of the scene. Some set fire to the green flag of Gadhafi's regime and shot holes in a poster with his image.
"Now we don't call it the Green Square, but we call it the Martyrs Square," said Nour Eddin Shatouni, a 50-year-old engineer who was among the residents who flowed out of their homes to join the celebrations. "We were waiting for the signal and it happened. All mosques chanted 'God is great' all at once. We smelled a good scent, it is the smell of victory. We know it is the time."
Green Square holds profound symbolic value. The regime has held pro-Gadhafi rallies there nearly every night since the revolt began in February, and the historic Red Fort that overlooks the square is a favorite scenic spot for the Libyan leader to deliver speeches to his loyalists.
Thousands of Libyans also celebrated in the streets of Benghazi, the rebels' de facto capital in the east. Firing guns into the air and shooting fireworks, they cheered and waved the rebel tricolor flags, dancing and singing in the city's main square.
Gadhafi's whereabouts Sunday were unknown. But he delivered a series of angry and defiant audio messages broadcast on state television, calling on his supporters to march in the streets of the capital and "purify it" from "the rats." He was not shown in the messages.
His defiance raised the possibility of a last-ditch fight over the capital, home to 2 million people. Government spokesman Moussa Ibrahim claimed the regime has "thousands and thousands of fighters" and vowed: "We will fight. We have whole cities on our sides. They are coming en masse to protect Tripoli to join the fight."
But it appeared that key parts of Gadhafi's military were peeling away.
The rebels' way into Tripoli was opened when the military unit in charge of protecting Gadhafi and the capital surrendered, ordering his troops to drop their weapons, the rebel information minister Mahmoud Shammam said.
In a sign of the coordination among rebels, as the main force moved into the city from the west, a second force of 200 opposition fighters from the city of Misrata further east landed by boat in the capital, bringing weapons and ammunition for Tripoli residents who join the rebellion, said Munir Ramzi of the rebels' military council in Misrata.
The rebels' speedy leap forward over just a few dramatic hours was a stunning reversal for Gadhafi, who earlier this month had seemed to have a firm grip on his stronghold in the western part of Libya, despite months of NATO airstrikes on his military. Rebels had been unable to make any advances for weeks, bogged down on the main fronts with regime troops in the east and center of the country.
NATO Secretary-General Anders Fogh Rasmussen said Gadhafi's regime was "clearly crumbling" and that the time to create a new democratic Libya has arrived.
The sooner Gadhafi "realizes that he cannot win the battle against his own people, the better," he said in a statement, adding that NATO will continue to strike his troops if they make "any threatening moves toward the Libyan people."
Gadhafi is the Arab world's longest-ruling, most erratic, most grimly fascinating leader - presiding for 42 years over this North African desert republic with vast oil reserves and just 6 million people. For years, he was an international pariah blamed for the 1988 bombing of a Pan Am jumbo jet over Lockerbie, Scotland, that killed 270 people. After years of denial, Gadhafi's Libya acknowledged responsibility, agreed to pay up to $10 million to relatives of each victim, and declared he would dismantle all weapons of mass destruction.
That eased him back into the international community.
But on February 22, days after the uprising against him began, Gaddafi gave a televised speech amid violent social unrest against his autocratic rule. In the speech, he vowed to hunt down protesters "inch by inch, room by room, home by home, alleyway by alleyway." The speech caused a furor that fueled the armed rebellion against him and it has been since mocked in songs and spoofs across the Arab world.
The rebel force that moved toward Tripoli Sunday, taking town after town, was greeted by thousands of jubilant civilians who rushed out of their homes to cheer the long convoys of pickup trucks packed with fighters shooting in the air. One man grabbed a rebel flag that had been draped over the hood of a slow-moving car and kissed it, overcome with emotion.
Some of the fighters were hoarse, shouting: "We are coming for you, frizz-head," a mocking nickname for Gadhafi. In villages, mosque loudspeakers blared "Allahu Akbar," or "God is great."
"We are going to sacrifice our lives for freedom," said Nabil al-Ghowail, a 30-year-old dentist holding a rifle in the streets of Janzour, a suburb just six miles west of Tripoli. Heavy gunfire erupted nearby.
Once they reached Tripoli, the rebels took control of one neighborhood, Ghot Shaal, on the western edge of the city. They set up checkpoints as a convoy of more than 10 trucks rolled in to advance further into the city. Resistance was minimal, with rebels reporting occasional fire from snipers on rooftops.
Rebel chief Mustafa Abdel-Jalil in Benghazi confirmed to the AP that the rebels arrested Gadhafi's son Seif al-Islam but refused to give the details of the capture.
"We have captured Seif al-Islam and he is in safe hands," he said.
In the Netherlands, the prosecutor at the International Criminal Court, Luis Moreno-Ocampo, said his office would talk to the rebels on Monday about Seif al-Islam's transfer for trial. "It is time for justice, not revenge," Moreno-Ocampo told the AP.
Seif al-Islam, his father and Libya's intelligence chief were indicted earlier this year for allegedly ordering, planning and participating in illegal attacks on civilians in the early days of the violent crackdown on anti-regime protesters.
The day's first breakthrough came when hundreds of rebels fought their way into a major symbol of the Gadhafi regime - the base of the elite 32nd Brigade commanded by Gadhafi's son, Khamis. Fighters said they met with little resistance. They were 16 miles from the big prize, Tripoli.
Hundreds of rebels cheered wildly and danced as they took over the compound filled with eucalyptus trees, raising their tricolor from the front gate and tearing down a large billboard of Gadhafi. From a huge warehouse, they loaded their trucks with hundreds of crates of rockets, artillery shells and large-caliber ammunition.
One group started up a tank, drove it out of the gate, crushing the median of the main highway and driving off toward Tripoli. "This is the wealth of the Libyan people that he was using against us," said Ahmed al-Ajdal, 27, pointing to his haul. "Now we will use it against him and any other dictator who goes against the Libyan people."
At the base, the rebels also freed more than 300 prisoners from a regime lockup, most of them arrested during the heavy crackdown on the uprising in towns west of Tripoli. The fighters and the prisoners - many looking weak and dazed and showing scars and bruises from beatings - embraced and wept with joy.
"We were sitting in our cells when all of a sudden we heard lots of gunfire and people yelling 'God is great.' We didn't know what was happening, and then we saw rebels running in and saying 'We're on your side.' And they let us out," said 23-year-old Majid al-Hodeiri. He said he was captured four months ago by Gadhafi's forces crushing the uprising in his home city of Zawiya. He said he was beaten and tortured while under detention.
From the military base, the convoy sped toward the capital. Mahmoud al-Ghwei, 20 and unarmed, said he had just came along with a friend for the ride .
"It's a great feeling. For all these years, we wanted freedom and Gadhafi kept it from us. Now we're going to get rid of Gadhafi and get our freedom," he said.
The uprising against Gadhafi broke out in mid-February, and anti-regime protests quickly spread. A brutal regime crackdown quickly transformed the protests into an armed rebellion. Rebels seized Libya's east, setting up an internationally recognized transitional government there, and two pockets in the west, the port city of Misrata and the Nafusa mountain range.
Gadhafi clung to the remaining territory, and for months neither side has been able to break the other.
In early August, however, rebels launched an offensive from the Nafusa mountains, intending to open a new, western front to break the deadlock. They fought their way down to the Mediterranean coastal plain, backed by NATO airstrikes, and captured the strategic city of Zawiya.
On Saturday, they consolidated control of Zawiya, then launched their furious rush on the capital.
At the same time, rebel "sleeper cells" inside Tripoli rose up and clashed with Gadhafi loyalists. Rebel fighters who spoke to relatives in Tripoli by phone said hundreds rushed into the streets in anti-regime protests in several neighborhoods on Sunday.
Government minders in a hotel where foreign journalists have been staying in Tripoli armed themselves on Sunday in anticipation of a rebel take over. The hotel manager said he had received calls from angry rebels threatening to charge the hotel to capture Ibrahim, the government's spokesman.
In the early morning hours of Monday, three gunmen entered the Rixos hotel and began looting it. An AP cameraman saw a gunman take an unattended laptop and put some other objects into a bag and walk out of the hotel.
Heavy gun fire was heard in the neighborhood around the hotel, and smoke was seen rising from a close by building.
Hadeel Al-Shalchi in Cairo contributed to this report.