But in the space of just two hours yesterday, the Libyan dictator’s Bab al-Azizia compound was overrun by rebels at the same bewildering pace with which Tripoli itself had been taken barely a day earlier.

The first, unconfirmed reports of rebels breaching the outer walls of the sprawling headquarters began to circulate shortly after 3pm; by 5.15pm live television pictures were showing rebels kicking a dismembered, gold-plated head they had wrenched from a statue of Gaddafi in his inner sanctum.

In the most extraordinary scenes since the battle for Libya began in February, hundreds of rebels poured into the compound and raised their flag above a sculpture of a fist crushing a US fighter plane.

Outside, streets which had been deserted by fearful residents throughout the day suddenly filled with the noise of celebration and honking car horns as the news spread across the capital.

Gaddafi appeared to have denied the rebels their ultimate prize, for now at least, after apparently slipping away from his compound through a labyrinth of underground tunnels.

What would become a day of jubilation had begun with gloomy predictions of a long, bloody siege at the fortified compound as rebel leaders said they did not have the firepower to breach the 3ft thick concrete walls which rose to a height of 12ft for miles around the perimeter of what has been called “Gaddafi’s Pentagon”.

No one on either side was in any doubt that the battle for Tripoli had become the battle for Bab al-Azizia, which translates as Splendid Gate, and almost from first light Nato warplanes bombarded military targets next to the 2.3 square-mile compound.

Throughout the day, a thick plume of black smoke billowed across the sky from Gaddafi’s headquarters as a series of missiles hit home.

A hard core of fanatical Gaddafi loyalists appeared determined to stage a bloody last stand as witnesses reported seeing rockets and mortars being fired from inside the compound and snipers on roofs tried to pick off rebel soldiers.

Gaddafi himself even managed to have a telephone conversation with his friend Kirsan Ilyumzhinov, the Russian head of world chess, telling him that he was still in Tripoli and intended to fight to the end.

In the streets surrounding the compound, there were no obvious signs that rebel fighters were making any headway. But then, shortly after 3pm BST, came the first unconfirmed reports that rebels had breached a gate in the first of the compound’s walls.

“Our forces are surrounding Bab al-Azizia. There is a fierce battle going on there. We are now controlling one of the gates, the western entrance,” said Col Ahmed Omar Bani, one of the leaders of the assault.

Thirty minutes later rebels were heard firing into the air in celebration from inside the compound as resistance from Gaddafi loyalists appeared to have melted away.

With astonishing speed, the rebel fighters scaled the second and third perimeter walls protecting Gaddafi’s residence, dashing a quarter-mile across the open, grassy grounds to reach the despot’s home.

By now events were unfolding at astonishing speed, and by 4.30pm hundreds of fighters had poured in through the open gates.

One of them reportedly brought the medical records of Saif al-Islam, Gaddafi’s son, to show a reporter outside as proof that the residence was in rebel hands.

As news spread across the city, cars and pedestrians filled the streets as crowds celebrated the dictator’s downfall. Chants of “God is great” could be heard and drivers honked their horns.

Then, at 5.10pm, came the moment that will live long in the history of the new, free Libya. Local television crews who had followed the rebels into the compound broadcast pictures of a grinning rebel fighter holding aloft a severed head from a statue of Gaddafi, before placing it on the ground for his comrades to kick in the face.

Behind him, another fighter climbed on top of the statue of a fist crushing a US fighter plane.

It had been erected as a show of defiance after US bombers acting on orders from President Ronald Reagan had tried, and failed, to destroy the compound in 1986 after Libyan terrorists bombed a Berlin nightclub used by American servicemen.

Where the might of America’s armed forces had failed, the determination of a few hundred amateur fighters had triumphed.

The green flags of Gaddafi’s Libya were torn down or burned all over the compound to be replaced with the red, black and green flag of the rebels.

The large tent in the grounds of the compound where Gaddafi held meetings with world leaders was quickly razed. William Hague, the Foreign Secretary, was among the first to hail what he described as a “historic achievement”.

With no sign of Gaddafi, the rebels plundered his armouries to re-equip themselves for the battles that still lie ahead. Others plundered the despot’s personal possessions.

Sky News, which was broadcasting live from outside Gaddafi’s residence by 6pm – just two and a half hours after the rebels had first broken through – found one fighter wearing the dictator’s trademark brocaded peaked cap, together with other symbols of office, including a gold chain and staff.

“I just went inside his bedroom,” said the unnamed young man. “It was like, 'Oh my God, I’m in Gaddafi’s room’.

“I’m going to give this to my dad as a present because he’s suffered so much.”

Other souvenirs being waved aloft included a gold-plated AK-47 assault rifle.

For others, the celebrations were tempered by the fact that Gaddafi had managed to slip away.

“Where are you?” said one rebel, with a mixture of defiance and menace, adding: “We are looking for you! Where are you?

''This country is not for Gaddafi and his bloody sons,” declared one of his friends. “It is for Libyans.”

Asked if he had a message for Gaddafi, a third rebel said simply: “Go to hell.”