A French court found former President Nicolas Sarkozy guilty on Monday of trying to bribe a judge and influence peddling, making him the second head of state in modern-day France to be convicted of corruption.

Sarkozy, who led France from 2007 to 2012 and remains influential among conservatives, tried to bribe a judge and of influence peddling in exchange for inside information on an investigation into his presidential campaign finances.

Prosecutors told the court the 66-year-old should be jailed for four years and serve at least two. During his testimony, Sarkozy said he was the victim of lies and denied ever committing an act of corruption.

“Never. Never abused my influence, alleged or real,” he told the court in December. “What right do they have to drag me through the mud like this for six years? Is there no rule of law?”

Prosecutors said Sarkozy offered to secure a plum job in Monaco for judge Gilbert Azibert in return for confidential information about an inquiry into accusations that he had accepted illegal payments from L’Oreal heiress Liliane Bettencourt for his 2007 presidential campaign.

This came to light, they say, while they were wiretapping conversations between Sarkozy and his lawyer Thierry Herzog after Sarkozy left office, in relation to another investigation into alleged Libyan financing of that 2007 campaign.

Azibert, at the time a magistrate at France’s top appeals court for criminal cases and well-informed on the Bettencourt inquiry, did not get the job in Monaco.

Prosecutors are seeking the same punishment for Azibert and Herzog, who are on trial alongside Sarkozy.

Sarkozy’s predecessor, Jacques Chirac, is the only other president under France’s post-war Fifth Republic to have faced trial after leaving office.

Chirac, who died in 2019, was found guilty in 2011 of presiding over a system of ghost jobs in Paris City Hall for political cronies when he was mayor of the capital. Handed a two-year suspended sentence, Chirac escaped serving time in jail.