Former French President Nicolas Sarkozy leaves the courthouse in Paris on Thursday. Photo by Yoan Valat/EPA

Sept. 25 (UPI) -- A Paris judge sentenced former French President Nicolas Sarkozy to five years in prison on Thursday on criminal conspiracy charges for accepting campaign funding from former Libyan dictator Moammar Gadhafi.

The court acquitted him on the other charges he faced, including passive corruption and illegal campaign financing.

Even if Sarkozy appeals the ruling -- which he says he plans to do -- he could be sent to prison within a matter of days, BBC News reported. If so, he would be the first former French president to be incarcerated.

In addition to the prison time, Judge Nathalie Gavarino ordered Sarkozy to pay a fine of nearly $117,000 and issued an immediate five-year ban on him attending any public function, Euro News reported.