The U.S. ambassador to Libya raised the American flag over a newly reopened embassy Thursday, a month after Moammar Gaddafi fled the capital and seven months after the embassy staff was forced out.

“I never thought I’d come back, and I’m overjoyed,” ambassador Gene Cretz said as he stood under a date palm in the garden of his former residence, which will serve as the embassy until a permanent location is found. The old embassy was destroyed by pro-Gaddafi forces in May as distraught embassy staff monitored the situation from a temporary office in Washington.

Cretz praised the Transitional National Council, the temporary government that steered the six-month rebellion, and said he was confident in its ability to form a cohesive government and bring Libya’s diverse — and heavily armed — militias under control.

There are thousands of unaccounted for weapons in Libya, many of which were seized by rebel forces as they stormed Gaddafi government bases.

“It’s clear that we’re worried,” Cretz said, adding that the United States and other countries are working with the TNC to track down and secure the arms, perhaps in the form of buybacks. The weapons are of particular concern because they could be sold outside Libya, he said, adding, “We know that al-Qaeda is trying to take advantage of it and what better way than to get these weapons out on the open market?”

The United States hopes to send a defense attaché to Libya soon and to restart educational and scientific exchange programs, Cretz said. U.S. companies are eager to invest in Libya in the areas of infrastructure building and green technology, he said, noting that U.S. oil companies that were in Libya before the revolution would be among those whose contracts would continue to be honored in the new Libya.

For Cretz, the return to Libya was particularly sweet. Arriving in 2009 to become the first U.S. ambassador here in more than three decades, he was forced to leave in a hurry in December 2010 after classified government documents obtained by WikiLeaks described Cretz detailing some of Gaddafi’s eccentricities, such as his fear of flying over water and his fondness for flamenco dancing.

Being able to return now was, he said, like being given “a second life.”

As Cretz spoke Thursday, the rebel victory in Libya was far from complete; anti-Gaddafi forces are still battling loyalist holdouts in the towns of Sirte, Bani Walid, and part of Sabha. NATO agreed Wednesday to extend its sea and air campaign for up to 90 days in support of the new government. And fissures have begun to show among the victors, with tension rising between regional factions, and between secularists and Islamists.

“Nobody knows now what the political fabric of this country is going to look like after 42 years in which there was no political fabric,” Cretz said. “So I think there is a genuine cause to be concerned that things could go wrong.”

But he applauded the accomplishments of the TNC and the Libyan people in the past six months and said he doubted that after four decades of dictatorship Libyans would tolerate a power grab by any one group.

“Let’s give the Libyans a chance to move their society forward and to have a political process,” he said. “They’ve never had one.”