The outcome had, for a long time, been far from certain and pockets of fierce loyalist resistance still remain unvanquished. But the civil war has to all intents and purposes been won by the rebels, and David Cameron and Nicolas Sarkozy came to Libya yesterday to gather plaudits for enabling the provisional victory to take place. At the same time, however, they were keen to stress that the intervention had absolutely nothing to do with oil.
The British Prime Minister and the French President were given a warm welcome by the public in Libya's capital for helping to deliver them from Colonel Gaddafi. Then they went on to Benghazi to bask in a similar greeting.
News of the visit had been tightly controlled but there was genuine enthusiasm from those who turned out to watch and cheer their arrival. Even as the European leaders arrived, there were reminders that Libya is not yet free of violence. Rebel fighters made another advance on the Gaddafi stronghold of Sirte, coming under rocket fire as they approached the city.
Nato said its warplanes had carried out 123 sorties over the country on Wednesday, almost 50 of them to identify and hit targets. But, vanquished though he was, Gaddafi himself was still nowhere to be found.
In Tripoli, those scenes felt distant. Instead, matters of diplomatic rivalry took precedence. The British team arrived on a C -130 military transport aircraft; the much larger French party, with a contingent of riot police, came in a civilian airliner. The cavalcade that swept into the city centre on streets cleared of traffic was a hybrid mix of governmental limousines and "technicals" – flat-bed trucks mounted with guns and carrying revolutionary fighters, some with their faces covered by bandanas, and waving Kalashnikov assault rifles. Apache helicopter gunships patrolled over the sea.
Mr Cameron and Mr Sarkozy went to meet patients and medical staff at the Central Clinic in Tripoli, which dealt with the injured and dying during the battle for the capital. There, as in other places they visited, the leaders were greeted with applause. "Let us face it, without them Gaddafi would have crushed us and many more would have been dead," said Qais Ali Abdullah, a surgeon. "We have had to pay a price. I have myself treated people injured by Nato bombs, but we are now a free country because of France and Britain."
Later, a press conference was held with senior members of the opposition's National Transitional Council (NTC) at the Corinthia Hotel – the venue where British and US officials met their Libyan counterparts seven years ago when Colonel Gaddafi was "coming in from the cold". The shoddy compromises made at the time – prisoners being sent back under rendition to be tortured, exiled opponents being spied on by British intelligence on behalf of Gaddafi's regime – were exposed in documents found in ministries.
But yesterday was not the time to delve into past embarrassments. Mustafa Abdul Jalil, head of the NTC, thanked Mr Sarkozy and Mr Cameron for their "brave position" following the uprising. "They showed us political, economic and military support which helped the rebels establish a state and we thank France and the UK for that," he said. The Prime Minister replied: "I am proud of our role. But this was your revolution, not our revolution."
However, there seemed to be unease that the West's motivations would be questioned. Mr Sarkozy, in particular, was vehement that the decision to intervene in Libya was not motivated by commercial concerns. "Some documents which have appeared in the media are lies ... They are forgeries," he said. Mr Jalil strongly denied claims circulating in the Middle East and beyond that "under the table" deals had been done for Libya's riches. There are, however, likely to be contracts worth an estimated $200bn for reconstruction. The NTC leader added: "As a faithful Muslim people ... we will appreciate these efforts and [France and Britain] will have priority within a framework of transparency."
The rebels had repeatedly threatened that those countries which did not back them would face commercial retaliation once they seized power. Britain, meanwhile, will return more than £600m of frozen Libyan assets, provide £600,000 for mine clearance, offer 50 hospital places in the UK for badly-injured Libyans, and send a small military team. Mr Sarkozy and Mr Cameron both said they saw Libya as a model for the whole region. The Prime Minister said: "This does go beyond Libya. This is a moment when the Arab Spring could become a summer and we see democracy advance in other countries, too."
The President added that he looked forward to the day when young Syrians would "be given the same opportunities as young Libyans".
However, just three weeks after Gaddafi's overthrow, there are deep fractures within Libya's revolutionary movement. Mr Jalil said victory would not be declared until three remaining Gaddafi strongholds – Sirte, Bani Walid and Sabbah – had been taken and Gaddafi and his coterie captured. However, the countdown to elections cannot begin until the NTC announces victory, and delaying this means the hierarchy remains in power.
As the British and French convoys left, a rebel officer, Saied Mohammed al-Bashti, said patience was running out. "We need to get these unelected people out. That is what most of the fighters think," he grumbled. "If this does not happen there will be another revolution."
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies