A Nato warplane shot down a scud missile fired from Sirte, Muammar Gadafy's home city east of Tripoli, a US defence official confirmed.
The official, speaking on condition of anonymity, could not immediately say what the intended target was.
Col Gadafy's forces, battling a rebellion that is on the verge of toppling the long-time leader, had fired a scud missile earlier in August which landed in the desert and hurt no one.
Libyan government tanks and snipers put up scattered, last-ditch resistance in Tripoli today after rebels swept into the heart of the capital, cheered on by crowds hailing the end of Col Muammar Gadafy's 42 years in power.
Libyan rebels have captured Muammar Gadafy's son Saadi, Al Arabiyah television reported today, citing the head of the rebel National Transitional Council.
Two other of Col Gadafy's sons, Saif and Mohammed, are also in rebel hands.
The 69-year-old leader, urging civilians to take up arms against rebel "rats", said in an audio broadcast that he was in the city and would be "with you until the end". But there was little sign of popular opposition to the rebel offensive. It was unclear where Col Gadafy was.
United Nations secretary general Ban Ki-moon said it was crucial that the conflict end now without any further loss of life or retribution.
Reuters correspondents saw rebel forces hunt sharpshooters from building to building. Sporadic gunfire and shelling kept civilians off the streets, waiting anxiously for the fighting to end after a brief outpouring of jubilation late yesterday.
"Revolutionaries are positioned everywhere in Tripoli," said a senior rebel in the city, who used the name Abdulrahman.
"But Gadafy's forces have been trying to resist. There is gunfire everywhere," he added, saying government tanks were in action near Tripoli's Mediterranean port and downtown near Col Gadafy's Bab al-Aziziya compound. "Snipers are the main problem," he said. "There is a big number of martyrs."
World leaders were in no doubt that, after six months of an often meandering revolt backed by Nato air power, the disparate and often fractious rebel alliance was about to take control of the North African desert state and its extensive oil reserves.
Some warned of a risk of a longer, anarchic civil war after what has been the bloodiest of the Arab Spring uprisings inspired by the overthrow of autocrats in Tunisia and Egypt.
The fall of Col Gadafy could also give new heart to embattled opposition groups across the Middle East, notably in Syria.
"Time has run out," said Franco Frattini, foreign minister of Libya's former colonial ruler Italy, adding that Col Gadafy's forces now controlled only 10 to 15 per cent of the capital.
Laila Jawad (36) who works at a Tripoli nursery, said after the rebels arrived: "We are about to be delivered from the tyrant's rule. It's a new thing for me. I am very optimistic. Praise be to God."
State television seemed still to be held by Gadafy loyalists. "The morale of our troops is high," a presenter said. But children's programming replaced the martial music and images of Col Gadafy which have dominated its airtime for months.
In a coordinated move late on Saturday by rebel cells in the capital and assaults on several fronts, Tripoli saw some of the heaviest fighting of the war. A government official told Reuters 376 people on both sides were killed, and about 1,000 wounded, though it was unclear how the figures were arrived at.
Civilians had flocked late yesterday to Green Square, long the showpiece of the leader's personality cult, waving rebel flags. Some said they would rename it Martyrs' Square.
But early today, rebel spokesman Nouri Echtiwi said, tanks and pick-up trucks mounted with machineguns had emerged from Col Gadafy's Bab al-Aziziya compound. "They fired randomly in all directions whenever they heard gunfire," he said.
US president Barack Obama and other Western leaders urged Col Gadafy to accept defeat and prepared to work with the rebels - though the future leadership of Libya remains very unclear.
"Muammar Gadafy and his regime need to recognise that their rule has come to an end," Mr Obama said. He said the US would be a friend and partner to the "new" Libya and would help on the humanitarian front.
Mr Obama had not changed his opposition to putting US troops on the ground in Libya, the White House said earlier.
Britain’s prime minister David Cameron and French president Nicolas Sarkozy urged Col Gadafy to go.
"Gadafy must stop fighting, without conditions - and clearly show that he has given up any claim to control Libya," Mr Cameron said in a statement in London after breaking off a vacation in southwest England to chair a meeting of the National Security Council.
"His regime is falling apart and in full retreat."
Me Sarkozy, who spoke today to Mahmoud Jibril, one of the leaders of the rebels' National Transitional Council, called on Libyans to rally behind the "legitimate authorities" in a "spirit of reconciliation and unity," according to a statement released by the Elysee Palace in Paris.
The French president said forces loyal to Col Gadafy should lay down their arms and reject his "cynical and criminal blindness".
Mr Cameron and Mr Sarkozy led the drive earlier this year to secure a United Nations Security Council resolution condemning attacks by Col Gadafy’s military on civilians and sanctioning military action.
Italian prime minister Silvio Berlusconi also urged Col Gadafy to surrender and said his government backed the rebels.
The European Union, whose members had in recent years resolved disputes with Col Gadafy in return for energy supplies, welcomed a "new era": "We are witnessing the last moments of the Gadafy regime," EU foreign affairs chief Catherine Ashton said. She urged the rebels not to settle scores in blood and to respect human rights and move swiftly towards a new democracy.
South Africa, a leading power on the continent to which Col Gadafy devoted much of Libya's wealth and influence, denied it had sent a plane for Col Gadafy or was planning to shelter a leader who has been indicted for crimes against humanity by the International Criminal Court in The Hague.
Tánaiste Eamon Gilmore welcomed what appears to be the end of the Gadafy dictatorship.
"I have previously made clear our view that Colonel Gaddafi and his family have no role in the future government of Libya, and he should now depart without further violence," said Mr Gilmore.
The Tánaiste said he was hopeful the Libyan revolution could be brought to a successful end with the minimum of bloodshed.
Nato’s secretary general Anders Fogh Rasmussen said the Libyan people had “suffered tremendously” under Col Gadafy’s rule for more than four decades.
“Now they have a chance for a new beginning. Now is the time for all threats against civilians to stop, as the United Nations Security Council demanded. Now is the time to create a new Libya – a state based on freedom, not fear; democracy, not dictatorship; the will of the many, not the whims of a few,” he said.
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 Gadafy."
Col Gadafy, a colourful and often brutal autocrat, said he was breaking out weapons stores to arm civilians. 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," Mr Ibrahim said yesterday. "Even if the leader leaves or steps down now, there will be a massacre."
Mr Obama, on vacation in the island of Martha's Vineyard, said in a statement: "The surest way for the bloodshed to end is simple: Col Gadafy and his regime need to recognise that their rule has come to an end. Gaddafi needs to acknowledge the reality that he no longer controls Libya. He needs to relinquish power once and for all."
After civil war that became a stalemate in the desert for long periods, rebels raced into Tripoli, with a carefully orchestrated uprising launched on Saturday night to coincide with the advance of rebel troops on three fronts. Fighting broke out after the call to prayer from the mosques.
Rebel National Transitional Council co-ordinator Adel Dabbechi confirmed that Col Gadafy's younger son Saif al-Islam had been captured. The ICC, which wants him along with his father on charges of crimes against humanity, confirmed he had been held and said he should be handed over for trial.
Col Gadafy's eldest son Mohammed had surrendered to rebel forces, Mr Dabbechi said. In a television interview, Mohammed said gunmen had surrounded his house. He told Al-Jazeera in a phone call that he and his family were unharmed.
Only five months ago Col Gadafy's forces were set to crush the rebel stronghold of Benghazi in the far east of the vast and thinly populated North African state of six million. He warned then that there would be "no mercy, no pity" for his opponents. His forces, he said, would hunt them down.
Agencies