TRIPOLI, Libya - The U.S. ambassador to Libya returned to Tripoli Wednesday to lead a newly reopened American Embassy in a post-Moammar Gadhafi era.

Ambassador Gene Cretz arrived in Tripoli, a day before plans to raise the U.S. flag over the embassy building in the Libyan capital. It was about eight months after he left for consultations in Washington in January after WikiLeaks posted his opinions of Gadhafi's personal life and habits in a classified 2009 diplomatic cable. At the time, the Obama administration was considering replacing him due in part to strains in ties caused by the blunt assessment.

Cretz returns to a country much changed since revolutionary forces seized control of Tripoli and forced the authoritarian leader into hiding after an uprising that began in mid-February.

Cretz was nominated to be the first U.S. ambassador to Libya in 36 years by President George W. Bush in July 2007 after a remarkable turnaround in U.S. relations with the North African nation.

The seismic shift in relations followed Gadhafi's 2003 renunciation of weapons of mass destruction and payment of compensation to the families of victims of 1980s terror attacks, including the bombing of PanAm 103 blamed on Libyan agents.

Cretz had kept a relatively low profile in Libya until November, when WikiLeaks posted his assessments of Gadhafi's personal life and habits in a classified 2009 diplomatic cable.

The secret document said Gadhafi "appears to have an intense dislike or fear of staying on upper floors, reportedly prefers not to fly over water, and seems to enjoy horse racing and flamenco dancing." It also discussed Gadhafi's longtime reliance on a Ukrainian nurse named Galyna who the cable said had been described as a "voluptuous blonde."

President Barack Obama announced Tuesday that the ambassador would return, telling Libyans: "This is your chance. And today the world is saying, with one unmistakable voice, we will stand with you."

The United States launched the military air campaign that helped rout Gadhafi's forces after the U.N. Security Council passed a resolution in March authorizing a no-fly zone and approving all necessary steps needed to protect civilians. NATO later took charge.

On Wednesday, NATO's decision-making body, the North Atlantic Council, granted approval to extend the mission for another 90 days, an alliance official said, speaking on condition of anonymity because a formal statement had not yet been prepared. Without an extension, permission for the operation would have expired Sept. 27.

While many in the nation of 6 million people are enjoying newfound freedoms, well-armed Gadhafi loyalists are still fighting on three fronts, and Libya's new rulers are struggling to form a government.

The National Transitional Council, which led the rebellion and is the closest thing Libya has to a government, failed Sunday to seat a new Cabinet, dashing hopes a new government would be in place before the interim leadership left to represent Libya at the U.N. General Assembly this week.

In New York, the NTC's Prime Minister Mahmoud Jibril said Tuesday that he expected a new government to be formed "within a week, 10 days maximum from now."

He said most of the work has been done, but it was important to ensure national consensus on the issue. The current political difficulties were not unusual for a "country which was absent from ... .any democratic culture," he said.

Gadhafi wielded near-total control over the North African nation for nearly 42 years. The uprising -- inspired by the successful ouster of autocratic leaders in Tunisia and Egypt -- spread from the eastern city of Benghazi in mid-February.

Armed fighters still loyal to the fugitive leader have repelled anti-Gadhafi forces in Sirte, the mountain enclave of Bani Walid and the southern area of Sabha.

Government forces have made inroads against Gadhafi loyalists in Sabha, the last major city on a key road leading south to the border with Niger.

Abdel-Salam Sikayer, a spokesman for a local council in Sabha, said anti-Gadhafi forces largely have control over two neighbourhoods and are fighting to overtake pockets of resistance. He said 28 people, including three children, had been killed in fighting over the past two days -- 18 on Tuesday and 10 on Monday.

Obama said Tuesday the NATO-led bombing campaign in Libya will continue as long as civilians are threatened. He urged Gadhafi loyalists to lay down their arms and join the new Libya, declaring, "the old regime is over."

NATO has launched over 8,750 strike sorties on Libya since late March. The latest strikes hit military targets belonging to Gadhafi loyalists in Sirte, according to a NATO statement released Wednesday. The Western military alliance also said it struck targets Tuesday some 280 kilometres south of Sirte in Weddan, where revolutionaries suspect military weapons to Gadhafi loyalists in Sirte may be coming from.

Revolutionary fighters tried to push into Sirte, 400 kilometres southeast of Tripoli on the Mediterranean coast, over the weekend but were driven back by fierce rocket and gunfire. They pulled back to regroup, although the two sides exchange fire daily.

Akram Hameida, a 27-year-old fighter from the nearby city of Misrata, said he heard about 10 NATO airstrikes within about five to 10 minutes of each other on Wednesday afternoon. He said they appeared to be hitting close to the downtown area and airplanes roared overhead.

As he spoke, rockets fired by Gadhafi loyalists in the city rained down on a sandy rural area with scattered trees close to revolutionary force positions.