David Cameron delivered a stark warning that problems in Libya were far from over tonight as Muammar Gaddafi's 42-year grip on power was finally broken.
Amid bloody clashes as rebels laid siege to the dictator's heavily fortified compound in Tripoli, the Prime Minister said people should be "proud" of Britain's role in the uprising.
But he stressed there was no room for "complacency", and more international help would be needed to ensure the country made a smooth change to democracy.
In scenes of high drama, rebel fighters met relatively light resistance as they poured into the capital. However, significant casualties were reported today as Gaddafi's forces stage a bloody last stand at his official residence.
There are also fears of revenge attacks on civilians both within Libya and outside.
The US has said it does not believe the dictator has left the country, and several of his sons - including heir-apparent Saif al-Islam - have been captured.
The head of the Libyan National Transitional Council (NTC), Mustafa Abdel Jalil, warned that victory was not yet complete.
But he added: "The youth of Libya have written an epic heroic battle."
Politicians around the world have welcomed the abrupt collapse of the regime, with President Barack Obama hailing proof that the "universal pursuit of dignity and freedom is far stronger than the iron fist of a dictator".
Oil prices fell and stock markets rose on hopes that the destabilising conflict could be nearing an end.
Mr Cameron interrupted his holiday in Cornwall to return to Downing Street and discuss the developments with his National Security Council.
Speaking outside Number 10 after the meeting, he said Gaddafi was in "full retreat" and his forces should "stop fighting, without conditions".
Although the "immediate priority" was to establish security in the capital, he also urged leaders to keep their eyes on the bigger picture.
"The situation in Tripoli is clearly very fluid and there is absolutely no room for complacency," Mr Cameron said. "Our task now is to do all we can to support the will of the Libyan people which is for an effective transition to a free, democratic and inclusive Libya.
"This will be and must be and should be a Libyan-led and Libyan-owned process with broad international support co-ordinated by the UN."
He added: "This has not been our revolution, but we can be proud that we have played our part.
"There will undoubtedly be difficult days ahead. No transition is ever smooth or easy.
"But today the Arab Spring is a step further away from oppression and dictatorship and a step closer to freedom and democracy and the Libyan people are closer to their dream of a better future."
The Prime Minister said he would "like to see Colonel Gaddafi face justice" for his "appalling crimes against his own people" but it was for the Libyans to decide what would happen.
He said: "Libya is a sovereign nation. It is a matter for the new authorities in Libya to do what they believe is right with Gaddafi.
"First, obviously, they have to find him."
The UK Government will establish a "diplomatic presence" in Tripoli as soon as it is safe to do so, and frozen assets belonging to Libya would be released, according to Mr Cameron. He also spoke to UN Secretary General Ban Ki Moon about how to handle the aftermath this afternoon, and is expected to hold talks with Mr Obama and French President Nicolas Sarkozy later.
Labour leader Ed Miliband welcomed the "crumbling" of the Gaddafi regime and said the challenge was to ensure there was a transition to "stable government" in Libya.
"As we see events unfold in Libya, we should take pride in the role of brave British servicemen and women and the way Britain is working with other countries to enforce the will of the UN," he said.
"The international community has come together on Libya to show it can unite and stop the brutal murder of his own people that Colonel Gaddafi threatened."
Meanwhile, there have been calls for the man convicted of the Lockerbie bombing to be brought back to Britain following Gaddafi's departure.
Tory MP Robert Halfon said extradition to the US should also be considered so Abdelbaset al-Megrahi - who was released from a Scottish prison on compassionate grounds two years ago - does not continue a "life of luxury" in Libya.