David Cameron has said the UK will "play its part" in helping Libya to rebuild itself as he praised the "courage and resilience" of its people.
Speaking in Paris after he chaired a summit on Libya with France's Nicolas Sarkozy, he said early signs for its future were "incredibly impressive".
But he said Nato military operations would continue "as long as needed".
And he said those that had committed "unspeakable crimes" during the conflict must be brought to justice.
The 60-nation conference has been considering what assistance the international community can provide to the country after months of fighting and the overthrow of Colonel Muammar Gaddafi.
Those present included UN secretary general Ban Ki-Moon, German Chancellor Angela Merkel and US Secretary of State Hilary Clinton as well as senior figures from Libya's interim political authority, the National Transitional Council.
'Seizing the future'
Mr Cameron has said the international community stands ready to give advice and assistance to the country's new leaders as they embark on the path of building a free, democratic and inclusive Libya.
He has insisted the transition from years of dictatorship must be a "Liyban-led" process.
At a press conference after the summit, he said the Libyan people "had taken their country back" and he gave his backing to the country's new leaders.
He praised their success in reopening hospitals and restoring power supplies and said those who predicted chaos on the streets after the collapse of Col Gaddafi's rule had been proved wrong.
"Every time the National Transitional Council has been challenged, it has come up to the mark."
"What we are seeing is the Libyan people want to seize this new future. You are seeing the Libyan people coming together because they want to rebuild their country."
Nevertheless, after Col Gaddafi pledged to continue the fight, the prime minister said the "struggle was not yet over" and Nato would continue its military mission as long as needed to protect civilians.
The international community had been right to intervene in Libya, he added, as this had prevented far greater bloodshed but he acknowledged "unspeakable crimes" had been committed.
"We must be clear that those crimes must be investigated and the guilty brought to justice."
The UK has said the immediate focus of international assistance should be on providing urgent medical and humanitarian aid as well as diplomatic support as the NTC assumes power.
The government delivered £140m in cash to the Libyan central bank on Wednesday - assets which were frozen in March after the UN approved sanctions against Col Gaddafi and his family.
Mr Cameron said the UK would push for a wider UN resolution to release other funds and assets around the world belonging to the Libyan people.
French President Nicolas Sarkozy said about $15bn (£9bn) had been released in recent days.
Amid reports that French companies are already seeking talks with Libyan officials about helping to rebuild the country's shattered infrastructure, Foreign Secretary William Hague said UK companies would not be "left behind" when it comes to competing for contracts.
All those present wanted "good economic and commercial links with a prosperous Libya," he said.
The NTC has given forces remaining loyal to Col Gaddafi an extra week to lay down their arms but the former Libyan leader has vowed to fight on as uncertainty about his whereabouts continues.