Saif al-Islam and Mutassim Gaddafi were said to have been in the town, one of only three major Libyan centres still holding out for the former leader, as recently as last week.

Rebel military leaders said residents had told them that the two had fled, leaving behind a detachment up to 100 loyalist troops and local allies who have taken up positions in private houses in anticipation of a rebel attack.

“The main Gaddafi brigade left with Saif al-Islam,” said Abdullah Kenshil, the chief negotiator for the rebels, at a checkpoint north of the town. “We think there are 70 troops left there in the town, but there are other people with them.”

He added that residents were being prevented from fleeing.

Col Abdulrazzaq al-Nadouri, the deputy commander of rebel forces based in the town of Tarhouna, about 50 miles to the north, added: “Some of them [Gaddafi forces] are hiding in local families they are using as human shields. We’re afraid for the families in the town.”

Rebel troops on the ground have been threatening to attack Bani Walid, the headquarters of Libya’s biggest tribe, the Warfalla, since the end of last week. But the National Transitional Council is afraid of further divisions and bloodshed. Many Warfalla opposed Col Gaddafi, particularly after scores were executed following a coup attempt in the early-1990s, and are bitterly resentful that some Warfalla leaders continued to support him.

The NTC has been trying to negotiate a peaceful end to the stand-off with Moussa Ibrahim, the chief spokesman for the Gaddafi regime, whom Mr Kenshil said was still in the town. Mr Ibrahim was said to have demanded face-to-face talks and that the rebels disarm first.

Rebels believe that several members of the Gaddafi clan headed for Bani Walid after being driven out of Tripoli, while the colonel himself is thought to have pressed on further south. Mansour Daw, Col Gaddafi’s internal security chief, was reported to have passed through Bani Walid and later crossed the southern border into Niger, escorted by Toureg tribesmen loyal to the old regime.

Rebel spokesmen in Benghazi fear the stand-off at Bani Walid was deliberately orchestrated to give the family time to escape to the porous desert borders.

Meanwhile, Nato is closer to winding up its mission in Libya, the military alliance’s secretary general said yesterday.

Anders Fogh Rasmussen added: “Our operation to protect civilians has moved significantly closer to success, but we are not there yet.”

Britain re-established its diplomatic mission in Tripoli on Monday some six months after having closed its embassy in Libya’s capital at the start of the revolt against Gaddafi.

Meanwhile, Nuri Berruien, the newly appointed chairman of the country's National Oil Company, admitted Libyan oil production will not return to prewar levels until later next year at the earliest.

In an interview with The Financial Times, Mr Berruien said while some production from Libya’s eastern fields should begin this month, the “initial oil output will be measured in the 10,000s of barrels a day rather than in the 100,000s of b/d”. The prewar level was 1.6 million barrels a day.