A judge investigating allegations that Nicolas Sarkozy took donations from the late Libyan dictator Muammar Gaddafi ordered the former French president's phone to be tapped, it has been revealed.

The tap allegedly exposed that Sarkozy was illegally being fed information about an ongoing case by a court official, whom he offered a position in Monaco, claim investigators.

Sarkozy is believed to be the first French president to have had his phone tapped as part of a criminal investigation, Le Monde reported.

Thierry Herzog, Sarkozy's lawyer, said his client vehemently denied all accusations, which he claimed were politically motivated.

It is rumoured that Sarkozy is considering running for president again in 2017, and his supporters claim he is the victim of a smear campaign.

Herzog said his client's phone was probably still tapped, and "There was no attempt to pervert the course of justice and in due course this monstrous violation will be shown to have been a political affair."

It is alleged that Sarkozy was leaked information by a senior officer at the French appeals court on a case concerning the alleged illegal seizure of his diaries by French police.

In 2011, when then president Sarkozy ordered French forces to spearhead air raids on Colonel Gaddafi's forces, the Libyan leader's son, Saif al-Islam, said that his father had donated millions to Sarkozy's 2007 campaign fund.

Sarkozy was under investigation for allegedly accepting illegal donations from 90-year-old L'Oreal heiress Liliane Bettencourt, France's richest woman. The investigation was dropped last October.

Sarkozy strongly denies receiving any money from Gaddafi.