Former France President Nicolas Sarkozy has been found guilty of corruption and sentenced to three years' prison - a decision that stunned courtroom observers into silence, reports said Tuesday.

Sarkozy, 66, was convicted Monday of attempting to bribe a judge in 2014 - when he was no longer president - by suggesting he could give the judge a prestigious position in government in return for confidential information about an inquiry into his 2007 campaign finances.

"He took advantage of his status and the relationships he had forged," Reuters quoted presiding judge Christine Mee as saying at sentencing.

Sarkozy is the second head of state to have been jailed in France's modern history. The last French leader to be sent to prison was Marshal Philippe Pétain in 1945. He was convicted of treason for collaborating with the Nazis during World War Two.

The sentencing was unexpected: Sarkozy repeatedly denied the allegations and rejected the charges as an "insult to my intelligence."

He still has influence among French conservatives but the conviction could hurt his political status and ends his plans for a comeback ahead of elections next year.

Sarkozy, a director of France hotel company Accor S.A., said he was the victim of a witchhunt perpetrated by financial prosecutors who employed excessive means to pry into his affairs.

The judge said Sarkozy could serve his sentence under house arrest.

Sarkozy had no comment after the sentencing but his lawyer said he would appeal the verdict and sentence.