France's President Nicolas Sarkozy has denied an allegation that he received an illegal €50 million ($65 million) campaign contribution from the late Libyan dictator Moammar Gadhafi during Sarkozy's first presidential election in 2007.

The charge came from Mediapart, a French journalistic investigative group that publishes an online newspaper.

Sarkozy was quoted as telling France's TF1 television: It's ludicrous. [If] it had funded [the campaign], I would not have been very grateful. I feel sorry for you to be the spokesman for the son of Gadhafi, frankly,”

The accusation would appear to back up similar claims made by Gadhafi’s son, Saif al-Islam, last year just before the NATO military bombing campaign that ousted the dictator. Sarkozy and the French government strongly supported that mission. Saif demanded that the money be refunded to Libya; Sarkozy and his aides denied the charges at that time as well.

Soon after Sarkozy's election as president in 2007, he invited Gadhafi to Paris and even permitted the Libyan leader to pitch his trademark desert tent on the grounds of the Elysée Palace.

Mediapart wrote that arrangements for the financing might have been made as long ago as October 2005, when Sarkozy served as interior minister under Jacques Chirac.

The New York Times reported that Mediapart found and published a cryptic note that read: “modalities fin campagne NS reglees lors de la visite Libye NS + BH” which may be translated as “methods to finance Nicolas Sarkozy’s campaign settled during the Libya visit” by Sarkozy. The “BH” apparently refers to Brice Hortefeux, a close associate of Sarkozy and government minister at the time.

Hortefeux denied the allegations directly to Mediapart, but confirmed that he accompanied Sarkozy on a trip to Libya in October 2005.

Meanwhile, a spokesman for Sarkozy, Franck Louvrier, told Bloomberg News that the charges are “ridiculous, deceitful and false.”

The Times reported that the sensitive documents were leaked to Mediapart in connection with a court inquiry into an unrelated matter involving possible kickbacks derived from the sale of submarines to Pakistan 17 years ago.

Fabrice Arfi, a reporter for Mediapart, told Britain’s Guardian newspaper: We knew these documents existed, but it is the first time we have had the details of what was in them. And there are lots of details, including dates, places and amounts.

The sensational charges come at the worst possible time for Sarkozy, who is in the middle of a difficult re-election campaign. Polls indicate he is likely to lose to Socialist candidate Francois Hollande.