The Obama administration scrambled on Monday to support rebels in an unaccustomed role — national governance — as the unexpectedly rapid collapse of the Libyan army raised fears of chaos and reprisal killings in the nearly liberated capital.

U.S. diplomats hastily conferred with opposition leaders and allies on blueprints for maintaining order and distributing relief supplies in Tripoli, even as rebel fighters pressed their search for Moammar Gaddafi, the Libyan autocrat whose ouster became a central U.S. foreign policy objective.

The loyalist retreat over the weekend prompted a rush to implement Libyan transition plans drawn up with U.S. and allied support over the past five months. White House officials, mindful of the looting and anarchy that quickly overshadowed the U.S. military victory in Baghdad in 2003, pressed opposition leaders to act quickly to prevent lawlessness and restore basic services.

President Obama, in a broadcast speech, warned of “huge challenges” ahead for the opposition alliance, even as he hailed the apparent end of Gaddafi’s rule. The collapse of Gaddafi’s government was widely seen as an important foreign policy achievement for his administration.

“This is not over yet,” Obama said in an audio statement from Martha’s Vineyard, Mass., where he is vacationing with his family.

The president praised NATO and Arab allies, crediting them with preventing “wholesale massacres of innocent civilians.” To Americans, he noted: “All of this was done without putting a single U.S. troop on the ground.”

As he spoke, top aides consulted frequently with leaders of the main opposition alliance as it sought to consolidate its control over the capital. Secretary of State Hillary Rodham Clinton spoke by phone early Monday with Mustafa Abdel Jalil, the chairman of the opposition Transitional National Council, to discuss protection of Libyan civilians as rebel troops pounded remaining loyalist strongholds in Tripoli and surrounding towns. Afterward she spoke with officials from European and Middle Eastern countries on ways to coordinate financial and practical support for a post-Gaddafi Libya.

State Department officials separately took steps to free up some of the nearly $30 billion in frozen Libyan government assets held in accounts controlled by U.S. banks and investment houses.

For an administration that had been heavily criticized over its Libya policy — as recently as last month the rebel army appeared to be outmatched — the sudden breakthrough offered a sense of vindication. State Department spokeswoman Victoria Nuland credited the administration with building and maintaining a “community of common action of size and scope that is quite unprecedented in the modern era.”

Obama’s decision in March to open a third military front in a Muslim country by intervening in Libya was condemned by antiwar Democrats as well as conservative critics, who said the president’s cautious approach exposed a lack of leadership.

Obama made his first public remarks on Libya about 10 days after the fighting inside the country began, and he refrained from using Gaddafi’s name. He followed French President Nicolas Sarkozy in calling for Gaddafi’s ouster several days later, doing so far from the public eye in a phone call with German Chancellor Angela Merkel.

Guiding Obama’s pace and policy throughout was his desire to let European allies lead — and contribute money and resources to any joint effort — in a part of the world where the United States remains deeply unpopular.

Only after the Arab League endorsed military operations against Libya in mid-March did Obama begin pushing his advisers to begin diplomacy toward military action. The result was a Security Council resolution authorizing “all measures necessary” to protect civilians.

Obama’s low-profile position marked a shift from the last Democratic president, Bill Clinton, who in the case of Bosnia believed Europe would not intervene militarily unless the United States led the way.

Senior advisers called it a new conception of U.S. power — the quiet work of building broad international support with the United States acting as an equal partner among allies. European leaders initially welcomed the approach as an improvement on the sometimes go-it-alone stance of former president George W. Bush.

“This is precisely the way that we had been saying the strategy was suppose to work,” said Ben Rhodes, the deputy national security adviser for strategic communications. “The different elements of the strategy have coalesced and resulted in what we are seeing today.”

Rhodes said the “burden sharing” among allies that Obama called for at the start of the campaign has been fulfilled in the Libya operation, where U.S. forces took the lead role in the war’s early days, then gave way to an intelligence and support role backed by the deployment of armed drones.

As the fighting on the ground ebbed and flowed over the past five months, some congressional Republicans criticized Obama for not devoting more military resources to help the rebels push out Gaddafi. Administration officials called for patience.

“We’ve always said that we could stop Gaddafi, save lives, and that we also believe that we could create a dynamic that could work against his regime,” said Rhodes, citing the military effort, economic sanctions and diplomatic isolation that prompted many top Gaddafi officials to abandon his government.

This year, the White House feuded for months with Congress, where both liberal Democrats and conservative Republicans criticized Obama for entering the fight without legislative permission.

“It appears that this administration has engaged in a military operation to affect regime change without engaging the American public or Congress,” Rep. Michael R. Turner (R-Ohio) said Monday, a leading critic of Obama during the congressional debate over his authority to carry out the campaign. Now, Turner said he worries that the same problems that followed the U.S. invasion of Iraq — lawlessness, infighting, looting — could crop up again.

“The same concerns that we had when the president began this operation we have today,” Turner said. “We have not seen a plan from this administration concerning post-Gaddafi” Libya.

Staff writer David Fahrenthold contributed to this report.