A French court has acquitted a former ally of Nicolas Sarkozy on charges of swindling millions of euros from France's richest woman, L'Oreal heiress Liliane Bettencourt, by taking advantage of her weak mental state.

But the court handed a famed photographer a three-year prison sentence and a 350,000 euro ($382,000) fine.

In 2007, Bettencourt's daughter accused the photographer, Francois-Marie Banier, of manipulating elderly widow Bettencourt, now 92, into giving him artwork, cash and other favors worth hundreds of millions of euros.

Sarkozy's then-campaign treasurer, Eric Woerth, has been acquitted on charges of "abuse of weakness" and taking donations from Bettencourt during the 2007 presidential election campaign. Sarkozy himself was cleared in 2013 of preliminary charges.

The "Bettencourt Affair" ensnared French personalities as it made its way toward trial this year.