Former French president Nicolas Sarkozy has denied he had broken the law after being charged with corruption-related offences.

Mr Sarkozy has been placed under formal investigation on suspicions he tried to use his influence to thwart an investigation of his 2007 election campaign.

The step, which often but not always leads to trial, is a major setback to Mr Sarkozy's hopes of a comeback after his 2012 election defeat by Socialist rival Francois Hollande.

The conservative politician denies all wrongdoing in a string of investigations in which he is either directly or indirectly implicated.

In extracts of an interview released by LCI television and Europe 1 radio, Mr Sarkozy said: "I have never committed any act contrary to the values of the republic or the rule of law.

"I have never betrayed the confidence" of the French, he added, in the extracts released before the full interview aired.

It was to be Mr Sarkozy's first major broadcast interview since he lost the 2012 presidential election to Mr Hollande.

Mr Sarkozy also decried what he called "political interference in a part of the judiciary" in the case - a suggestion that opponents such as the ruling Socialists were behind the case against him.

He said he was "deeply shocked" by the charges, adding that "everything is being done to give me an image that is not truthful".

The former president is suspected of "influence peddling", corruption and benefiting from "the breach of professional secrets," the prosecutor's office said.

Mr Sarkozy was held in police custody in the Paris suburb of Nanterre for nearly 15 hours yesterday before being transferred to a Paris court, where he met investigating magistrates before being released.

His lawyer and a judge involved in the case were similarly placed under formal investigation on suspicion of illegally using their influence, their lawyer's said.

"These events only rely on phone taps ... whose legal basis will be strongly contested," said Paul-Albert Iweins, the lawyer for Mr Sarkozy's lawyer, Thierry Herzog.

"There's not a lot in this dossier, since none of the material elements of what I've seen, and what we could contest, support the accusations," he said.

Placing a suspect under formal investigation means there exists "serious or consistent evidence" pointing to probable implication of a suspect in a crime.

It was the second time the ex-president, who lost presidential immunity from legal prosecution a month after he left office in June 2012, was placed under such a judicial inquiry.

The first occurred in 2013 but magistrates later dropped the case against him.

There are six legal cases, including this one, hanging over his head, a shadow that many in his UMP party believe compromises his ability to lead a comeback in 2017.

The current questioning relates to suspicions he used his influence to get information on an investigation into funding irregularities in his 2007 election campaign.

Specifically, magistrates will seek to establish whether Mr Sarkozy tried to get a judge promoted to the bench in Monaco in exchange for information on that campaign finance inquiry.

Last October, magistrates dropped a formal investigation into Mr Sarkozy's role in irregularities in that 2007 campaign, and whether he had exploited the mental frailty of France's richest woman, L'Oreal heiress Liliane Bettencourt, to fund it.

But as investigators used phone-taps to examine separate allegations that late Libyan leader Muammar Gaddafi funded the same campaign, they began to suspect he had kept tabs on the Bettencourt case through a network of informants.

Those suspicions finally prompted police to launch an inquiry in February, which led to yesterday’s formal investigation.

Under French law, a suspect is not technically charged with a crime until later in the process.

Mr Sarkozy has remained coy about his plans for a comeback, but has been widely believed to be laying the groundwork for it.

He remains the favourite of conservatives to challenge Mr Hollande and his supporters claim the investigation is politically motivated.