US president Barack Obama today called for the last of Col Gadafy's 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," Mr Obama said in prepared remarks for a high-level UN conference on Libya. "We will stand with you in your struggle to realise the peace and prosperity that freedom can bring."

Libya's new flag flew at the United Nations today for the first time since Gadafy was deposed.

UN Secretary-General Ban Ki-moon, welcoming Libya's new leaders into the international community, said the Security Council had acted to protect the Libyan people from violence.

"Today, we must once again respond with such speed and decisive action - this time to consolidate peace and democracy," Mr Ban added.

Libya has reverted to the flag that was used from 1951 until 1977 when Gadafy, who ruled for nearly 42 years, introduced a green flag for his Libyan Arab Jamahiriya, or people's republic.

The US president's message came as transitional government forces confronted stiff resistance in the last strongholds of Gadafy 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," Mr Obama said nearly a month after the former Libyan leader was driven from power with the help of a Nato-led bombing campaign.

Seeking to bolster Libya's new leaders, Mr 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 added: "So long as the Libyan people are being threatened, the Nato-led mission to protect them will continue."

As loyalists in the towns of Bani Walid, Sabha and Sirte are still beating back regular assaults, Col Gadafy taunted Nato in a speech broadcast by a Syria-based television station today, although the station gave no new clues as to his location.

In the audio message carried by Arrai television, he also said Nato's planes would not be able to continue their operations in Libya.

"The political system in Libya is a system based on the power of the people . . . and it is impossible that this system be removed," he said. "The bombs of Nato planes will not last."

Nato has hit targets in both Bani Walid and Sirte, and in the more remote town of Sabha, deep in the Sahara desert, where the National Transitional Council (NTC) says it has now seized the airport.

Libyan provisional government forces held off attacking Col Gadafy's last bastions in the country today as civilians kept streaming out ahead of more assaults.

There were occasional skirmishes outside the deposed leaders hometown Sirte today, Reuters witnesses said, and doctors at a nearby field hospital said four NTC fighters had been killed by pro-Gadafy shelling.

Anti-Gadafy fighters said they had captured a tank from pro-Gadafy forces who may have been trying to flee in it from Sirte. The tank, draped in sheepskin, stood on the main highway to the south of the Mediterranean coastal city. Fighters climbed on top of it chanting, "God is greatest", waving the NTC flag and firing their rifles into the air in celebration.

Sirte may fall in "two or three days," the head of the NTC's military wing, Maj Gen Suleiman Mahmoud, said in an interview yesterday. He said he was heading to the coastal city to supervise operations and possible talks for its surrender.

At least 44 fighters have been killed and 213 wounded in the area since September 15th, according to the army council in Misrata, which has been leading the assault.

Opposition forces have struggled to overrun the mountain town of Bani Walid, 140km south of Tripoli, where loyalists and mercenaries have been shooting at residents who attempt to revolt, a spokesman for the NTC, said.

Meanwhile, the African Union (AU) recognised the council as Libya's de facto government today, removing another piece of diplomatic support for Col Gadafy. In a statement, the union said it was ready to support the NTC in its efforts to build an inclusive government.

South Africa, the continent's pre-eminent economic power which has a major say in AU policy, also said today it would also recognise the NTC, ending a long-standing relationship with the ousted leader.

"The South African government, hereby announces that it recognizes the NTC as the representative of the Libyan people as they form an all-inclusive transitional government that will occupy the Libyan seat at the African Union," the International Relations and Cooperation Department said in a statement.

Agencies