Just three weeks after rebel forces backed by NATO bombers overran Muammar Gaddafi's capital, French President Sarkozy and the British prime minister were met by the smiling leaders of the disparate coalition which overthrew him and took impromptu cheers from medical staff while visiting a hospital.

At a news conference held under heavy security and the eyes of attack helicopters overhead, interim premier Mahmoud Jibril spoke of "our thanks for this historic stance" taken by the two European leaders, whose backing for the February uprising drew a hesitant United States and some Arab governments into a war that did not always look set to end well for the rebels.

Both offered continued military support against Gaddafi loyalists holding substantial parts of the country as well as in the hunt for the fugitive strongman and others wanted for crimes against humanity. Sarkozy said he would raise the issue with neighboring Niger, a former French colony where some of Gaddafi's senior aides and one of his sons have sought refuge.

"This is not done. This is not over," Cameron said in pledging further military and other aid. "There are still parts of Libya that are under Gaddafi's control. Gaddafi is still at large and we must make sure that this work is completed." He said a Franco-British move at the United Nations on Friday could mean London alone unfreezing $19 billon of assets, while help with healthcare and disarmament was also ready.

With a clear eye on public opinion at home, he drew attention to the case of a boy wounded by a grenade at his school who would be treated by British specialists, while Sarkozy rebuffed suggestions of self-interest in the war, declaring: "We did what we did because we thought it was just."

REMEMBERING "FRIENDS"

But though he hotly denied talk of among Arabs of "under the table deals for Libya's riches," the head of the National Transitional Council (NTC), Mustafa Abdel Jalil, did say that in return for their helping end 42 years of rule by Gaddafi, key allies could expect preferential treatment in the future. Though insisting no deals had been cut in advance of France and Britain backing the rebellion against a ruler with whom both had been improving relations, Abdel Jalil said: "As a faithful Muslim people ... we will appreciate these efforts and they will have priority within a framework of transparency."

Other states which did business with Gaddafi, notably China and Russia, have been concerned that their lukewarm attitude to the NTC may cost them economically. While Abdel Jalil stressed a desire to allocate contracts on the best terms for Libya, and to honor existing contracts, he said some could be reviewed.

Those deals signed by Gaddafi which were skewed by personal corruption could be canceled, he said -- noting he had served as a minister under the old regime and knew its secrets. Cameron, keen to steer clear of public triumphalism for a policy of support that seemed to many highly risky, insisted that Libyans were in charge of their own country and that there was still much to do bring peace and democracy.

"I'm proud of our role," he said. "But this was your revolution, not our revolution."

He and Sarkozy were driven into Tripoli in a convoy of dozens of vehicles, including some of the pick-up trucks mounted with anti-aircraft guns that have been the symbol of the Libyan revolt. They were expected to fly later to Benghazi, the seat of the uprising in February which was to add Gaddafi to the list of autocrats felled by the Arab Spring of revolts. With an eye on events in Syria and elsewhere, Cameron said Libyans could inspire others: "This does go beyond Libya," he said. "This is a moment when the Arab Spring could become a summer and we see democracy advance in other countries too."

"MERCI SARKOZY"

Both men are popular on the streets of Libya, where "Merci Sarkozy" and "Thank you Britain" are common graffiti slogans. Both may hope to earn political dividends back home from what now appears to have been a successful bet. Gaddafi has not been seen in public since June. In a letter read out on Syria-based Arrai TV he called on the U.N. Security Council to protect his hometown of Sirte -- still held by forces loyal to him -- from what he called NATO "atrocities."

"If Sirte is isolated from the rest of the world in order for atrocities to be committed against it, then the world has a duty not to be absent," Gaddafi was quoted as saying. The need for Sarkozy and Cameron to visit Benghazi as well as Tripoli is a sign of the obstacles Libya still faces in transforming itself into a peaceful, unified democracy. The NTC has not yet been able to safely establish a government in a capital still bristling with militiamen from disparate groups.

Cameron offered Jibril and Abdel Jalil a personal vote of confidence, saying they had "continually proved the skeptics wrong," and urging them to continue a "generous" policy of trying to include different groups in government and avoiding reprisals against those who took Gaddafi's side. But the country is deeply divided. Many of its new rulers hail from Benghazi in the east, while the fighters who won the battle for Tripoli mostly come the west. The NTC has promised to name a more inclusive government lineup within days.

Abdel Jalil said he would only declare "liberation" -- and hence set the clock ticking on a 20-month timetable to free elections -- once the NTC controlled all Libya's territory. On Wednesday, he called for equipment to fight what he predicted would be hard battles against Gaddafi loyalists near the city of Sabha deep in the Sahara desert. "There will be a lot of fierce fighting in this area," he told BBC television.

"We ask for support to get the right equipment in order to conquer these troops and to proceed further south to try and capture Colonel Gaddafi and his family." Towns held by Gaddafi loyalists have proven tenacious despite weeks of siege. After a week of fighting, NTC forces at Bani Walid, 150 km (95 miles) southeast of Tripoli, have been urging people to leave before they try to storm the town. People continued to flee on Thursday.