PARIS — The European Parliament voted Thursday to lift the immunity from prosecution for French far-right leader Marine Le Pen for tweeting gruesome images of Islamic State violence, a crime that carries up to three years in prison in France.
The legislature voted by a broad majority in Brussels to clear the way for the possible prosecution of Le Pen over tweets she made in December 2015 showing executions, including the killing of American reporter James Foley by Islamic State extremists.
French prosecutors in the city of Nanterre had asked lawmakers to lift the immunity that Le Pen enjoys as a member of the European Parliament.
Le Pen, a leading candidate in this year’s French presidential election, posted her tweets in response to a journalist who drew an analogy between her anti-immigration National Front party and ISIS extremists. She was trying to show the difference between the two groups but the effort backfired, drawing condemnation.
Le Pen took down the tweet showing the killing of Foley after his family protested, but left up another image of violence by the extremists.
Under French law, publishing violent images can be punished by up to three years in jail and a fine of $78,800.
Before the vote, Le Pen defended her tweets Thursday, saying she just wanted to condemn the barbaric practices of ISIS, also known as Daesh.
‘‘I’m a lawmaker. I’m in my role when I condemn Daesh, this is my role,’’ she told French TV station LCP. ‘‘And if I don’t fulfill my role, I’m worth nothing as a lawmaker.’’
Her campaign manager, David Rachline, denounced the lawmakers’ actions.
The EU Parliament decision ‘‘marks the difference between those who denounce and fight Islamist fundamentalism and those who want to hide the atrocities,’’ Rachline said.