The vote means that a senior council official will be able to join world leaders and speak for Libya at next week's ministerial session of the General Assembly and also participate in meetings.

The resolution was approved by a vote of 114-17 with 15 abstentions, revealing divisions in Africa and Latin America over who should represent Libya.

The General Assembly's credentials committee had unanimously recommended that the former rebels be seated. It's chairman, Panama's UN Ambassador Pablo Antonio Thalassinos, said Mustafa Abdul-Jalil, who heads the National Transitional Council, had sent a letter seeking to take over Libya's seat.

The committee's recommendation faced opposition from a left-leaning Latin America trade group ALBA whose members include Venezuela, Nicaragua and Cuba among others.

Southern Africa's main regional bloc also opposed giving the NTC credentials immediately, but it failed to win support to defer a vote.

On the ground, NTC forces suffered setback. Columns of NTC fighters and vehicles withdrew chaotically from Bani Walid at dusk after hours of fierce fighting ended inconclusively.

"We have received orders to retreat. We have been hit by many rockets. We will come back later," NTC fighter Assad Al Hamuri told Reuters as he fled the front line.

The atmosphere was frantic and shouting matches erupted among the anti-Qaddafi fighters as their forces poured out of the city.