President Barack Obama called on Tuesday for the last of Muammar Gaddafi's loyalist forces to lay down their arms as he announced the return of the US ambassador to Tripoli and pledged to help Libya rebuild.
"Today, the Libyan people are writing a new chapter in the life of their nation," Obama said in prepared remarks for a high-level UN conference on Libya.
"We will stand with you in your struggle to realize the peace and prosperity that freedom can bring."
Obama's message came as transitional government forces confronted stiff resistance in the last strongholds of Gaddafi loyalists and the provisional leadership faced questions about whether it can unify a country divided on tribal and local lines.
"Those still holding out must understand-the old regime is over, and it is time to lay down your arms and join the new Libya," Obama said nearly a month after Gaddafi was driven from power with the help of a Nato-led bombing campaign.
Seeking to bolster Libya's new leaders, Obama said the US ambassador was now on his way back to Tripoli and "this week, the American flag that was lowered before our embassy was attacked will be raised again."
He further pledged: "So long as the Libyan people are being threatened, the Nato-led mission to protect them will continue."
"The world must support efforts to secure dangerous weapons -- conventional and otherwise -- and bring fighters under central, civilian control," Obama said.
Obama also delivered a staunch defense of his Libya strategy.
He had faced criticism for an initially slow response to the Libyan uprising and then set strict limits on the US role in the Nato air assault, which was officially justified as a means of stopping the massacre of civilians.
The White House felt vindicated in its approach when rebel forces took Tripoli.
"Libya is a lesson in what the international community can achieve when we stand together as one," Obama said.
But he insisted that "we cannot and should not intervene every time there's an injustice in the world."
Obama, who met earlier with Mustafa Abdul Jalil, chairman of Libya's Transitional National Council (TNC), held out promise the United States would build new partnerships with Libya, a top oil producer, to help unleash the country's "extraordinary potential."
He pushed for swift steps toward democratic reform after decades of authoritarian rule under Gaddafi.
"We all know what's needed. A transition that is timely," he said.
"New laws and a constitution that uphold the rule of law ... And, for the first time in Libyan history, free and fair elections."
In Benghazi, interim Prime Minister Mahmoud Jibril failed to name a new cabinet on Sunday when his proposals did not receive full backing from all current members.
The political infighting reveals some of the fractures in an alliance that was united in civil war by hatred of Gaddafi but remains split among pro-Western liberals, underground Islamist guerrillas and defectors from Gaddafi's government.
Nearly a month after Gaddafi was driven from power, his loyalists in the three towns are still beating back regular NTC assaults.
Gaddafi taunted Nato in a speech broadcast by a Syria-based television station on Tuesday, but the station gave no new clues as to his whereabouts.