analysisBy James Maxwell
Nicolas Sarkozy was cheered in Tripoli on a recent visit. But the former French president could soon fall from grace if his alleged dark dealings with Gadaffi come to light.
This March, two years after spearheading the intervention by NATO forces which helped topple the regime of Muammar Gaddafi, Nicolas Sarkozy returned to Libya.
The former French president, who was abruptly ejected from the Elysée Palace last spring by the Socialist Party's François Hollande, was greeted in Tripoli by crowds chanting "Vive la France".
Later, addressing members of the Tripoli local council, Sarkozy made a deeply personal plea for Libyan national unity amid much post-conflict disorder, saying: "I will tell you, as a friend - I would say as a brother - and from the bottom of my heart, you have to achieve reconciliation. Libya needs all its children".
Sarkozy couched his championing of the anti-Gadaffi uprising in the language of humanitarianism and has reiterated his commitment to the welfare of the Libyan people.
However, there may be more to his relationship with Libya than initially seems apparent. Last week, prosecutors in Paris launched a formal investigation into claims that the Gaddafi family donated huge sums - possibly as much as €50 million (around $66 million) - to Sarkozy to finance his first presidential bid six years ago.
These claims were first made by Saif Gaddafi after his capture by a militia group in 2011 but have since been repeated by two separate sources: one a Lebanese businessman named Ziad Takieddine under questioning by French police, the other journalists at the French investigative organisation Mediapart.
Sarkozy, whose immunity from criminal prosecution was stripped with the loss of the presidency, has dismissed the allegations as "grotesque" and "a fabrication" and pointed to his lead role in deposing Gaddafi as evidence of innocence.
But suspicions about Sarkozy's integrity are reinforced by the fact that the inquiry - which is examining charges of "money laundering... and the handling of the proceeds", "active and passive corruption" and "influence peddling" - relates not just to his alleged dealings in Libya but also to claims he 'exploited' 90-year old L'Oreal heiress Liliane Bettencourt, France's richest woman, by persuading her to fund his political campaigns.
The sense that the French political elite as a whole is deeply corrupt has if anything grown since the Socialist Party assumed power. In recent weeks, the government of François Hollande has been rocked by the revelation that its (now former) budget minister Jerome Cahuzac - one of whose chief tasks was to tighten tax evasion laws - was hiding €600,000 ($790,000) in a Swiss bank account.
None of this is likely to come as any great surprise to Libyans. In many respects, France's approach to Gaddafi's Libya followed the same pattern of hard-nosed self-interest and realpolitik which characterised that of the United Kingdom's in recent decades.
In the early 1970s, France and Libya developed close ties based on an exchange of Libyan oil and gas for French technical and military equipment and expertise.
But these ties began to weaken as Libya grew impatient with France's promiscuous approach to selling arms: French guns and tanks frequently ended up in the hands of Libya's regional competitors, including Egypt.
In 1979, a disgruntled Gaddafi accused France of reverting to colonialist type - a reference to France's brief post-World War II role as administrator of Libya's southern Fezzan region.
The relationship became more fraught yet in the 1980s when Gaddafi launched an ultimately unsuccessful war with neighbouring Chad, another recipient of French arms.
In this instance, France even supplied Chadian forces with a small group of military personnel. After this confrontation, France began to follow the lead of the UK and the US in portraying Gaddafi as an eccentric, anti-Western pariah.
But, like London, Paris eventually executed a strategic U-turn and, towards the tail-end of Gaddafi's rule, embarked on a sustained PR offensive designed to bring Libya out of diplomatic isolation.
In 2007, echoing the trip made by British Prime Minister Tony Blair to the Libyan desert, Sarkozy even allowed Gaddafi to pitch his Bedouin tents on the plush lawns of the Elysée compound.
If the allegations against Sarkozy prove to be accurate, they will serve as an fitting illustration of the duplicitous manner in which France - together with other Western powers - has tended to treat Libya in modern times.
France's Libya policy has been guided almost exclusively by its own short-term interests and it has frequently worked to the disadvantage of the Libyan people.
The irony is that, currently, the Libyan people themselves don't seem too preoccupied with securing recompense for their rough treatment at the hands of their French 'partners', at least if the crowds cheering for Sarkozy in Tripoli are anything to go by.
Those crowds may quickly fall silent, however, if a case against the former French president is pursued. Their affections are unlikely to be able to withstand the idea that he profited from their suffering.