Gaddafi made a plea for the people of Tripoli to fight the rebels. Reuters

Muammar Gaddafi has vowed "martyrdom or victory" hours after Libyan rebels swarmed into his fortified compound in Tripoli.

Following a day of heavy fighting in the Libyan capital, opposition fighters broke into Gaddafi's walled citadel, Bab al-Aziziya, where they were seen stamping on a gilded bronze head of the deposed despot and setting fire to his famous tent in a cathartic end to his 42-year rule.

But in an audio recording released to a Libyan television station, the dictator called his retreat from the compound a "tactical move". Gaddafi, who has not been seen in public for weeks, told al-Rai TV that Libyans must "cleanse the capital", and claimed he had made a discreet tour of Tripoli and felt the city was not in danger.

"All Libyans must be present in Tripoli, young men, tribal men and women must sweep through Tripoli and comb it for traitors. I have been out a bit in Tripoli discreetly, without being seen by people, and … I did not feel that Tripoli was in danger," he said.

Government spokesman Moussa Ibrahim, said 6,000 volunteers had arrived in Libya to join Gaddafi's cause, and warned that loyalist forces were ready and capable of fighting on for months, if not years.

In an audio recording, he warned they would turn Libya into "volcanoes, lava and fire against the imperialism". If the military strikes continued, he warned, Gaddafi forces would transform Tripoli into "a death trap".

"I don't think that the rebels will stand that fight because they haven't got the facilities to do that. They always ask Nato to help them and to intervene in their actions all the time. But I think Tripoli will be in two days or three days back to us," he said.

Rebel leaders said 400 people had been killed and 2,000 injured during the fighting, and there were reports of sporadic looting in the capital. But the whereabouts of the Libyan leader and his family remain unknown.

Tripoli was calmer on Wednesday morning, although pockets of loyalist resistance remain, including around the Rixos Hotel, where many foreign journalists are still trapped.

Loyalist strongholds also remain in the coastal town of Sirte, Gaddafi's birthplace, and the southern desert city of Sabha, while overnight pro-Gaddafi forces launched a number of Scud missiles towards rebel-held Misrata.

But the fall of Gaddafi's fortress-like city within a city, and the trampling of his likeness under the feet of Libya's new rulers, represented a symbolic moment of victory after a six-month civil war. Earlier in the day, loyalist snipers and mortars had held the rebels at bay in the streets around Bab al-Aziziya. The rebels responded with every weapon in their possession: artillery, mortars and rocket-propelled grenades, sending plumes of thick black smoke into the sky. By afternoon, bolstered by waves of opposition fighters who had streamed in from Libya's western mountains and Misrata to the east, they began to move forward on Bab al-Aziziya.

They massed at the pale green outer walls and blew the gates off, pouring into what had once been the regime's inner sanctum on foot, in cars, even in requisitioned golf carts. Another two layers of fortifications were quickly breached and, as the sun set, the rebels reached Gaddafi's residence, climbing on the statue of a fist clutching a US warplane, a symbol of his defiance after an American bombing raid in 1986.

A handful of rebels also tore the golden face off Gaddafi's statue, throwing it to the ground, prodding it with rifles and kicking it, while others climbed on to the roof of the building, little more than a shell after repeated Nato bombing sorties, and unfurled the red, black and green flag of pre-Gaddafi Libya.

A few yards away, Gaddafi's trademark tent, where he would receive visiting dignitaries, burned furiously. Outside, a rebel fighter had donned one of Gaddafi's grey and gold ceremonial caps and draped a gold chain around his neck. "Libyans will shock the world," he promised Sky News. "We want to start a new life, a new Libya."

But in the midst of the triumph, it soon became clear that the man who had ruled Libya for 42 years had slipped away, as had his sons, who had helped maintain his grip on the country and who had expected to inherit his power.

On Monday, the rebels claimed to have detained two of his sons, Saif al-Islam and Muhammad, as they swept into the capital. But that boast soon crumbled. Loyalists stormed the villa where Muhammad was being held under house arrest and freed him, while Saif al-Islam appeared at Tripoli's luxury Rixos hotel on Monday night and took journalists on a tour of nearby streets.

The staged photo opportunity turned out to be a last hurrah for a regime that had always been skilled at manipulating the media. By the morning, the pro-Gaddafi crowd had evaporated.

But the manhunt for Gaddafi went on. Abdel-Salam Jalloud, one of the leader's closest lieutenants until he defected earlier this month, told al-Jazeera he thought Gaddafi was moving around the outskirts of Tripoli, taking shelter at private homes, small hotels and mosques. Others thought he might be in Sirte or in Sabha; most observers, including the Pentagon, believed Gaddafi was still somewhere in Libya.

In the sky above Tripoli, Nato planes flew sorties. The coup de grâce to the Gaddafi regime was left to Libyan rebel fighters on the ground. But the pause was not expected to last long and the bombing of what strategic targets are left in Tripoli was expected to resume, alliance officials said. On Tuesday night there were reports of more explosions being heard around Tripoli.

Meanwhile, a number of serving British special forces soldiers, as well as ex-SAS troops, are advising rebel forces, although their presence is officially denied, the Guardian has learned.

The rebels started the day tentatively, but then a convoy of pickups arrived with anti-aircraft guns mounted at the back, and the offensive accelerated. Overnight, the rebels had been reinforced by hundreds of fighters from the opposition enclave of Misrata, who had broken through government lines along Libya's coastal road near the town of Zlitan, after months of trying, and driven under rocket fire the rest of the way to the capital.

Leaders of the National Transitional Council (NTC) who had orchestrated the anti-Gaddafi campaign from the eastern town of Benghazi had been taken aback by the speed of the offensive, and were struggling to keep up with the pace and prevent a power vacuum developing in Tripoli after the initial euphoria faded.

Mahmoud Shammam, an NTC spokesman, told the Guardian from Tunisia: "The swift movement of the battle has left our officials a little bit behind, but we are trying hard."

Mahmoud Jibril, deputy leader of the NTC, later told a press conference: "There should be no settling of scores. We should not besmirch the last page of the revolution. We have to concentrate on rebuilding and repairing our moral and physical wounds."

Jibril added that some "security measures" would be needed to stabilise the situation in Tripoli and elsewhere.

He said the NTC had taken the decision to form a security council that would be composed of Libyan army and police officials who had allied themselves with the rebels in recent months.

Members of the rebels' Tripoli brigade, made up of city residents and specially trained in Qatar, had been assigned to guard the national museum in Tripoli and other cultural sites, although Shammam was unsure how many locations were secure.

The NTC broadcast repeated public messages urging the population to stay calm, and not to loot or carry out reprisals. Police officers had been quietly approached in the weeks running up to Tripoli's fall and urged to stay at their posts.

Shammam said half the members of the NTC executive board, now functioning as an interim cabinet, would arrive in Tripoli on Wednesday morning to begin the work of reconstruction and the painful transition from an autocracy that had lasted longer than most Libyans' lifetimes.

He appealed to the international community to unblock Libyan funds frozen in western bank accounts since the fighting started, so that the new administration could pay civil servants and the police. The EU said it was poised to unfreeze the money as soon as it was approved by the United Nations, which will host a meeting of regional organisations on Friday.