A Paris court on Thursday sentenced former French President Nicolas Sarkozy to five years in prison after finding him guilty of criminal conspiracy in a scheme to finance his 2007 campaign with funds from Libya, a verdict that the still-influential conservative leader denounced as “a scandal.”

The historic ruling made Sarkozy the first former president of modern France to be sentenced to actual time behind bars.

In a major surprise, the court ruled that the 70-year-old will be incarcerated despite his intention to appeal.

It said his imprisonment would start at a date yet to be fixed, sparing the former head of state the humiliation of being led out of the packed courtroom by police.

The court found Sarkozy guilty of criminal association in a plot from 2005 to 2007, when he served as interior minister, to finance his winning presidential campaign with funds from Libya in exchange for diplomatic favors.

It cleared him of three other charges including passive corruption, illegal campaign financing and concealing the embezzlement of public funds.

Sarkozy denounced the ruling as a humiliation for the country.

The court found that two of Sarkozy’s closest associates when he was president -- former ministers Claude Guéant and Brice Hortefeux — were guilty of criminal association, but likewise acquitted them of some other charges.

The court sentenced Hortefeux to two years imprisonment, but said time can be served outside prison with an electronic monitoring bracelet.

Guéant was handed a six-year prison term but wasn't incarcerated immediately for health reasons.

The court said both Guéant and Hortefeux held secret meetings in 2005 with Abdullah al-Senoussi, the brother-in-law and intelligence chief of former Libyan dictator Moammar Gadhafi.

Gadhafi was toppled and killed in an uprising in 2011, ending his four-decade rule of the North African country.

The ruling from the panel of three judges said Sarkozy allowed his associates to reach out to Libyan authorities “to obtain or try to obtain financial support."

But the court said it wasn't able to determine with certainty that Libyan money ended up financing Sarkozy’s campaign.

The court explained that under French law, a corrupt scheme can still be a crime even if money wasn’t paid or cannot be proven.

Sarkozy, who was elected in 2007 but lost his bid for reelection in 2012, denied all wrongdoing during a three-month trial earlier this year.

Despite multiple legal scandals that have clouded his presidential legacy, Sarkozy remains an influential figure in right-wing politics in France and in entertainment circles, by virtue of his marriage to Bruni-Sarkozy.

Production by Alexander Turnbull