Marine Le Pen, the leader of France’s far-right Front National, has been acquitted of inciting hatred after she compared Muslim street prayers to the Nazi occupation.

Le Pen went on trial in Lyon after four anti-racism and human rights groups brought a case against her on charges of “incitement to discrimination, violence or hatred towards a group of people on the basis of their religion”.

Her remarks were made in 2010 at a party rally in Lyon while she was campaigning to take over the party’s leadership from her father and FN founder, Jean-Marie Le Pen. She referred to “street prayers” after reports of Muslims praying in public in three French cities, including Paris, because of the absence of mosques or lack of space in local prayer rooms.

The Guardian view on the French elections: Front National fails to gain power but its defeat is only partial | Editorial Read more

She told supporters: “I’m sorry, but for those who really like to talk about the second world war, if we’re talking about occupation, we can also talk about this while we’re at it, because this is an occupation of territory. It’s an occupation of swaths of territory, of areas in which religious laws apply … for sure, there are no tanks, no soldiers, but it’s an occupation all the same and it weighs on people.”

In court, the French state prosecutor had recommended that judges should find Le Pen not guilty, saying that her comments were part of her freedom of expression. Le Pen had told the court she had not committed any offence and had been expressing “political ideas” as part of her role as a politician. She accused the government of using the judiciary to persecute her.

Before the trial, the Muslim Council of France had said that “by comparing French Muslims to Nazis”, Le Pen had been attacking their honour and taking liberties with history. It warned that this type of statement “fed the climate of Islamophobia which we live in at the moment”.

It was the first time Le Pen had faced charges for hate speech, although her father, now 87, has several convictions for the offence, including a conviction for contesting crimes against humanity after saying the Nazi occupation of France was not “particularly inhumane”.

Le Pen’s anti-immigration, anti-European party did not manage to win control of any regions in the final round of regional elections on Sunday, but the party’s steady rise across France was confirmed as it recorded its best ever electoral score with 6.8m votes. Le Pen, whose presidential ambitions for 2017 were boosted by the score, said after the results: “Nothing can stop us now.”