President Obama announced Tuesday at a U.N. summit that he is reopening the U.S. Embassy in the Libyan capital of Tripoli and returning the American ambassador, underscoring U.S. support for the country’s new government.

The summit provided a rare opportunity for Obama and other world leaders to showcase the triumph of multilateralism during a week marred by discord over the Palestinians’ statehood bid and the assassination of Burhanuddin Rabbani, a former Afghan president who had emerged as a potential peacemaker. But it also highlighted the challenge of bringing stability to Libya, whose institutions were gutted during the 42-year rule of Moammar Gaddafi.

Standing before the flags of the United Nations and the new Libyan government, Obama said the victory of Libya’s Transitional National Council had proved the utility of pursuing concerted action to confront a common threat.

“Libya is a lesson in what the international community can achieve when we stand together as one,” Obama told the gathering, which was hosted by U.N. Secretary General Ban Ki-moon, and featured French President Nicolas Sarkozy and Turkish Prime Minister Recep Tayyip Erdogan. “When the old regime unleashed a campaign of terror, threatening to roll back the democratic tide sweeping the region, we acted — as united nations — and we acted swiftly.”

White House officials have held up Libya as a model for a kind of American leadership that relies on partnership and persistence rather than unilateral action. Gaddafi’s ouster, although he remains at large, provides a partial vindication of the president’s politically difficult decision to open a third military front in a Muslim country.

“Difficult days are still ahead,”Obama said. “So long as the Libyan people are being threatened, the NATO-led mission to protect them will continue. And 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.”

Even as Obama spoke, U.S. Ambassador Gene Cretz was on his way to Libya to reopen the embassy that had been shuttered in February. U.S. officials had been cautious about sending back Cretz, who had been recalled in December after getting threats following the WikiLeaks disclosure of his cables about Gaddafi’s eccentricities.

Libya’s transitional leader, Mustafa Abdel Jalil, paid tribute to a broad coalition of foreign governments, including Arab countries such as Qatar, Lebanon and Jordan, which provided diplomatic, economic and military support. He also credited the Western-led military coalition, saying that without their support, “we would not have been able to achieve victory in the face of such a huge amount of weaponry with which Gaddafi faced his people.”

Abdel Jalil sought to assure leaders that the new government was committed to halting reprisals against Gaddafi loyalists and supporters. He pledged to work closely with the United Nations — which is coordinating international support for post-conflict institution-building — to draft a constitution and prepare elections.

The Western-led military campaign in Libya had proved politically divisive in recent months, eliciting sharp criticism from countries including Brazil, China, Russia, India and South Africa. Their leaders argued that NATO had overstepped its U.N. mandate to protect civilians and backed the rebel overthow of a U.N. government.

On Tuesday, South African President Jacob Zuma, who had sought to negotiate a political settlement between Gaddafi and the opposition, said that his government now recognized the Transitional National Council as Libya’s legitimate government.

But Zuma chided Libya’s transitional government for not doing enough to protect migrant workers in Libya from reprisals by anti-Gaddafi fighters. He also called on NATO to cease its military operations, suggesting it was undercutting stability in the country. “The initial threat which warranted a no-fly zone no longer exists,” Zuma said at the meeting, arguing that it should be lifted as soon as possible.

But coalition leaders were in no mood to retreat, noting that Gaddafi’s loyalists continued to pose a threat to the Transitional National Council. Sarkozy expressed pride over France’s military role in Libya and contrition at not having come earlier to the aid of those pushing for change in Arab capitals.

“France is proud and pleased at having been a member of the coalition,” Sarkozy said. “We European countries tolerated regimes that we should have never tolerated.”