Former French President Nicolas Sarkozy came out fighting on Friday after being placed under investigation for exploiting the mental frailty of the country’s richest woman to raise election funds, with his lawyer rejecting the case as flawed.

A Bordeaux magistrate launched an inquiry on Thursday into whether Sarkozy took advantage of 90-year-old L’Oreal heiress Liliane Bettencourt, after she was declared in a state of dementia, to help raise money for his 2007 election campaign.

The “abuse of weakness” case threatens to scupper any political comeback for Sarkozy, unseated by Socialist Francois Hollande last year, by leaving him under a cloud of suspicion for months or even years.

The 58-year-old, who says he is innocent, hinted this month he could use his continued popularity among conservative voters to run again for president in 2017.

His lawyer Thierry Herzog said on Friday he would seek to annul the formal investigation, which is the final step before a suspect is accused of a crime and drawn into a case which could take years to complete.

“Mr Sarkozy will carry on fighting this but at the same time he believes the treatment that has been meted out to him has been disgraceful,” Herzog told RTL radio.

He pointed to repeated interviews conducted by investigating magistrate Jean-Michel Gentil of members of Bettencourt’s household staff as proof Gentil was more interested in getting incriminating evidence than hearing both sides of the story.

Allies of Sarkozy also leapt to his defense, with one suggesting the timing of the investigation was politically motivated to distract from a scandal surrounding one of Hollande’s ministers.

Bettencourt was declared in a state of dementia in 2006 and was placed under the guardianship of her family in 2011.

The public prosecutor said on Thursday that Sarkozy was being investigated “for taking advantage of a vulnerable person in February 2007 and during 2007 to the detriment of Liliane Bettencourt”, a crime punishable by up to three years in jail.

Judicial sources familiar with the case told Reuters that discrepancies emerged in the accounts given by Sarkozy and members of the Bettencourt household over the number of visits Sarkozy paid to the home, and with whom he had met.

According to a widely leaked transcript of a previous hearing in November, Sarkozy told Gentil then he went once to the home during his election campaign, a “courtesy” visit on February 24, 2007 and had only met Bettencourt’s husband, Andre.

The sources said Sarkozy now acknowledged he had also met Liliane Bettencourt on one unspecified occasion.

Moreover, a lawyer for the Bettencourt family butler told Reuters his client remembered ushering Sarkozy to the door of Andre Bettencourt on another day than the one cited by Sarkozy.

Thursday’s development came two days after Hollande’s Budget Minister Jerome Cahuzac stepped down to fight accusations of tax fraud after police said a leaked recording of a male voice admitting to holding a secret Swiss bank account was probably his. Cahuzac denies any wrongdoing.

It also came in the week that French authorities searched the Paris apartment of IMF chief Christine Lagarde, Sarkozy’s former finance minister, in an investigation into her award of a 2008 arbitration payment to a businessman supporter of Sarkozy.

Sarkozy’s former industry minister Christian Estrosi said there was a “political stench” to the inquiry.

“Everybody will notice that this happened 48 hours after a Socialist minister was put under a cloud, probably to compensate for that,” he said in a statement.

The political gain for Hollande, whose ratings are at record lows over his failure to reduce French unemployment at 13-year highs, is likely to be limited, although the inquiry will make it harder for Sarkozy to mount attacks on the government.

It could, however, open the way for a new leader of the French right to emerge. Opinion polls put Sarkozy well ahead of the two other main contenders, his former protege Jean-Francois Cope and the centrist Francois Fillon.

Yet many French voters will see the affair as confirming their low opinion of a political elite on both the left and right that has been beset by legal scandals for decades.

Sarkozy’s predecessor Jacques Chirac, who ruled France from 1995 to 2007, was handed a two-year suspended jail sentence in December after a court found him guilty of misusing public funds for political purposes when he was mayor of Paris.