Paris(CNN) A French court on Monday sentenced former President Nicolas Sarkozy to three years in prison for corruption and influence peddling, but suspended two years of the sentence.
President from 2007 to 2012, he was found guilty of trying to illegally obtain information from a senior magistrate in 2014 about an ongoing investigation into his campaign finances.
The judge said Sarkozy did not need to serve time in jail. He could serve the sentence by wearing an electronic bracelet at home.
The 66-year-old is the first president to have been sentenced to jail in France's modern history.
The Paris prosecutor had requested a two-year prison sentence and a two-year suspended sentence for Sarkozy and his co-defendants, his lawyer Thierry Herzog and former magistrate Gilbert Azibert.
Herzog and Azibert were found guilty and handed prison sentences.
After a lengthy investigation and legal entanglements, the trial began at the end of last year. The judge handed down Sarkozy's sentence Monday afternoon in front of a full courtroom.
Dubbed the "wiretapping case," it began in 2013 when investigators bugged phones belonging to Sarkozy and his lawyer Herzog, in the context of an inquiry against Sarkozy.
They discovered that the two men promised senior magistrate Gilbert Azibert a prestigious position in Monaco, in exchange for information about an ongoing inquiry into claims that Sarkozy had accepted illegal payments from L'Oreal heiress Liliane Bettencourt for his successful 2007 presidential campaign.
Sarkozy had begun eyeing a political comeback for France's 2022 presidential election with many from his party, Les Republicains, in support of his return.
Senator Pierre Charon had said it would be a "dream" to have the ex-president run again, and that he hoped Sarkozy would once more play an "important role."
Sarkozy briefly left the political scene after his failed bid for re-election in 2012, and after his failure to win the conservative primaries in 2016. Though he never officially said he would run in 2022, pundits believed that with no clear leader on the right, Sarkozy had a chance of once again becoming the party's candidate.
The conservatives' 2017 presidential bid was derailed after their candidate, former Prime Minister Francois Fillon, was accused of misusing public funds.
The scandal gave way to Emmanuel Macron's victory and Fillon was later sentenced to five years in prison and given a 10-year ban on running for office.
With the left still in tatters, pollsters are predicting a re-run of the 2017 contest between Macron and the far-right's Marine Le Pen. Macron's recent veer to the right suggests that he's trying to neutralize his biggest opponents, the right and the far-right.
Sarkozy faces other accusations. In just over two weeks' time he will once again be on trial accused of violating campaign financing rules during his failed 2012 re-election bid, by working with a friendly public relations firm to hide the true cost of his campaign.
In a separate case, French prosecutors are looking into alleged illegal campaign funding from Libya. Libya's former deceased leader Muammar Gaddafi allegedly provided Sarkozy's 2007 campaign with millions of euros shipped to Paris in suitcases.
In 2011, former president Jacques Chirac was found guilty of misuse of public funds and given a two-year suspended prison sentence for the employment of fictitious officials when he was mayor of Paris in the early 1990s.
The last French head of state to be sentenced to jail was Marshal Philippe Pétain in 1945 -- for treason after he collaborated with the Nazis.