The battle for Tripoli turned into a manhunt for Muammar Gaddafi, as pockets controlled by loyalist forces dwindled rapidly and the Libyan leader's last vestiges of power fell away at the end of a 42-year dictatorship.

Libyan state television, the vehicle for relentless government propaganda throughout the Gaddafi years, went off the air as rebels seized its transmitters.

Government troops kept up resistance in some areas of the city but were pummelled by Nato warplanes, which struck at least 40 targets in and around the city in 48 hours – the most intense bombing since the air campaign started more than five months ago.

By nightfall, the battle was focused on the wreckage of Gaddafi's central stronghold, Bab al-Aziziya. The compound has already been nearly flattened by earlier Nato sorties but it is believed to sit atop a network of reinforced tunnels and underground bunkers. Last night, Nato said pro-Gaddafi forces fired at least three Scud missiles from the city of Sirte, Gaddafi's birthplace.

Crowds gathered in Tripoli's Green Square to celebrate the arrival of the rebels at one point but many residents stayed indoors while street fighting continued in other districts. The head of the opposition National Transitional Council (NTC), Mustafa Abdel Jalil cautioned journalists at the rebel headquarters in Benghazi: "The real moment of victory is when Gaddafi is captured."

World leaders called for Gaddafi loyalists to stop fighting and for the leader to give himself up. David Cameron said he would "like to see Colonel Gaddafi face justice" for his "appalling crimes against his own people". "Libya is a sovereign nation. It is a matter for the new authorities in Libya to do what they believe is right with Gaddafi," the prime minister said, but he added: "First, obviously, they have to find him."

Barack Obama said yesterday the US would be a friend and partner to Libya, but urged rebels not to seek justice through violent reprisals. "The Gaddafi regime is coming to an end and the future of Libya is in the hands of its people," Obama said. He added that Gaddafi was "cut off from arms and cash and his forces were steadily degraded … Over the last several days the situation in Libya has reached a tipping point," he said, and "the people of Tripoli rose up to claim their liberties".

However, in a potential setback for the rebels, one of Gaddafi's sons, Saif al-Islam, who they said had been captured during the advance into Tripoli, appeared at Tripoli's Rixos hotel and told supporters that the rebel advance had been broken.

But his father's whereabouts were unknown on Monday night. Gaddafi has not been seen in public for months and his recent addresses to his people have been made using a poor-quality telephone line.

A US state department official, Jeffrey Feltman said in an ABC television interview that Washington did not know where Gaddafi was but a Pentagon spokesman, Colonel Dave Lapan, said American officials still believe he was in Libya. "We do not have any information that he has left the country," Lapan said.

Gaddafi is wanted for crimes against humanity by the international criminal court (ICC), along with Saif al-Islam and his intelligence chief, Abdullah Senussi, for their role in the brutal suppression of the anti-government protests which began in February. Talks have begun between court officials and the NTC over the handing over of Saif al-Islam, but it is unclear how the rebels intend to respond.

Fighting continued outside the capital, as rebel forces based to the east in Misrata tried to break through government lines 80 miles from Tripoli, at Zlitan. The heaviest combat took place at a bridge at Wadi Kam, and also two miles south of Zlitan, where pro-Gaddafi forces fired mortars and anti-aircraft guns at rebel lines from a base at a cement factory.

Sources in Misrata had earlier said they hoped to send a unit across the lines to meet government forces and negotiate their surrender. But such plans appeared to be on hold on Monday afternoon as rebel reinforcements in black painted jeeps mounted with machine guns and recoilless rifles drove at speed up the main highway to Zlitan.

Even as the fighting raged on, preparations for a transition were underway. The rebel military leadership in Misrata confirmed that a unit of 200 rebel fighters travelled from Misrata to Tripoli by sea over the weekend, bringing weapons and ammunition, and a team of medics. The sea-borne mission was also intended to stake the NTC's claim to authority in Tripoli, and to shore up security in the wake of Gaddafi's fall.

The UN secretary general, Ban Ki-moon, said he would hold talks on supporting post-Gaddafi Libya, while regional organisations, the Arab League, African Union and European Union, and France will host a meeting of the "contact group" of major powers and rebel leaders.

British diplomats will move from Benghazi to Tripoli as soon as it was safe to do so, Cameron said and added that Britain would soon release £12bn ($20bn) of Libyan assets, which had been frozen. Germany indicated it would follow suit with £7bn of frozen Libyan funds.

Fierce clashes are reported between rebels and Gaddafi forces in the Abu Salim district in Tripoli, just south of Gaddafi's former compound. There is speculation that Gaddafi – or one or more of his sons – may be holding out in the district