Libyan rebels entered Tripoli's central Green Square early on Monday amid little or no resistance from forces loyal to Muammar Gaddafi, a source from the rebel National Transitional Council told Reuters by telephone.
Rebel fighters waved opposition flags in jubilation after reaching the square, once reserved for carefully orchestrated rallies praising Gaddafi. Live television footage from the scene was aired by several broadcasters including Sky.
Rebels firing into the air drove into Green Square, a symbolic showcase the government had until recently used for mass demonstrations in support of the now embattled Gaddafi. Rebels immediately began calling it "Martyrs Square".
Earlier, a convoy of rebels entered a western neighbourhood of the city. Rebels said the whole of the city was under their control except Gaddafi's Bab Al-Aziziyah stronghold, according to al-Jazeera Television.
Two of Gaddafi's sons were captured by the rebels, who were also reported to have seized the Libyan state radio building in the capital. Gaddafi's presidential guard units laid down their arms.
Remaining defiant, Gaddafi earlier had made two audio addresses over state television calling on Libyans to fight off the rebels.
"I am afraid if we don't act, they will burn Tripoli," he said. "There will be no more water, food, electricity or freedom."
But resistance to the rebels appeared to have largely faded away, allowing the rebels and their supporters to demonstrate in Green Square.
Televised images showed Libyans kneeling and kissing the ground of Tripoli in gratitude for what some called a "blessed day".
Many Tripoli residents received a text message from the rebel leadership saying: "God is Great. We congratulate the Libyan people on the fall of Muammar Gaddafi."
Gaddafi, a colourful and often brutal autocrat who has ruled Libya for more than 40 years, said he was breaking out weapons stores to arm the population. His spokesman, Moussa Ibrahim, predicted a violent reckoning by the rebels.
"A massacre will be committed inside Tripoli if one side wins now, because the rebels have come with such hatred, such vendetta...Even if the leader leaves or steps down now, there will be a massacre."
Nato, which has backed the rebels with a bombing campaign, said the transition of power in Libya must be peaceful.