Marine Le Pen, the leader of France's far-right National Front (FN), has been acquitted of charges of inciting hatred after comparing Muslim street prayers to the Nazi occupation.
The 47-year-old had been accused of "inciting discrimination, violence or hatred toward a group of people based on their religious beliefs" over the comments she made on the campaign trail in December 2010.
However magistrates in the southeast city of Lyon absolved her of any crime.
Ms Le Pen's FN made a historic showing in regional elections on Sunday, although the anti-immigration party did not manage to win any regions.
However, its strong showing in a first round of voting panicked mainstream parties, forcing them to band together to strip votes from the FN in the second round.
Nevertheless the party recorded its best-ever electoral score with 6.8 million votes, prompting Ms Le Pen to crow: "Nothing can stop us now."
Ms Le Pen, who took over the party from her rabble-rousing father Jean-Marie in 2011, has worked hard to soften its image.
The party remains staunchly anti-EU and opposed to immigration and Ms Le Pen has compared the flood of migrants on Europe's doorstep to the "barbarian invasions" of the fourth century.
While on the campaign trail in December 2010, she complained about places in France where Muslims worshipped in the streets outside mosques when they were full.
"I'm sorry, but for those who like talking a lot about World War II, if it comes to talking about the Occupation, we can talk about it, because that (Muslims praying on the street) is the occupation of territory," she told a crowd in Lyon.
"It is an occupation of part of the territory, suburbs where religious law is applied. Sure, there are no armoured vehicles, no soldiers, but it is an occupation nonetheless and it weighs on residents."
After the comments, which provoked outrage in France, Ms Le Pen was investigated but the probe was later closed without further action.
However, a complaint led to the launch of a judicial enquiry in January 2012.
Ms Le Pen was charged in July 2014 after her immunity as a member of the European Parliament was lifted following a vote requested by French authorities.
While relieved of these charges, Ms Le Pen is still facing legal woes.
Her party has also been slapped with charges of fraud as part of an ongoing probe into campaign financing.