Two men in their seventies were seriously injured on Monday when a man opened fire at a mosque in the southern French city of Bayonne, local authorities said.

A man in his eighties was arrested shortly afterwards, according to a police source.

The attack came after two weeks of rancorous debate in France about Islam, secularism, and, especially, the wearing of headscarves by some observant Muslim women.

Hours earlier, President Emmanuel Macron had met with Muslim leaders to discuss issues including extremism and the veil.

Local authorities said the attack in Bayonne started when a man tried to set the door of the mosque on fire.

He was surprised by the two victims, and shot them. He then set a vehicle alight while leaving the scene.

The attacker was arrested shortly afterwards at his home, the Pyrenees-Atlantiques prefecture said in a statement posted on social media. A police source said the man arrested was in his 80s.

Newspaper Le Parisien and broadcaster BFMTV both reported, citing police sources, that the person arrested was a former local elections candidate for the far-right National Front.

A spokesman for the party, since renamed National Rally, told dpa that the man, who has not been officially named, had indeed run for it in elections but had been expelled in 2015.

National Rally leader Marine Le Pen condemned the attack, writing on Twitter that it was “an indescribable act utterly contrary to the values of our movement.”

The attack “moves and angers every one of us,” Interior Minister Christophe Castaner wrote on Twitter.

“Solidarity and support to the Muslim community, who are understandably shocked and alarmed,” the minister added.

France’s current controversy about Islam started earlier this month when a National Rally politician demanded that a mother accompanying a school trip to the public gallery of a regional assembly be ordered to take off her headscarf.

Under French laws enforcing secularism, teachers and officials as well as schoolchildren are forbidden from wearing religiously distinctive clothing.

But that does not apply to parents who help out by accompanying school trips.

The French Senate is Tuesday due to consider a draft law by lawmakers from the main opposition party, the conservative Les Republicains, that would extend the ban to such cases.

Le Pen has called for a complete ban on the veil in all public places.

Hours before the attack, Macron met leaders of the French Council of the Muslim Religion (CFCM), the official body representing Islam in France.

CFCM vice president Anouar Kbibech said the president had “reassured us” that French Muslims should be able to “live their religion.”

Macron had also told the group that he “counted on us to take strong initiatives” on topics including extremism, the veil, and the place of women in Islam, Kbibech told reporters afterwards.

Radical left-wing leader Jean-Luc Melenchon drew a link between the attack and the recent controversy.

“At Bayonne, the harassment against Muslims has produced its effect,” he wrote on Twitter.

“Public speech must stop encouraging hatred,” Melenchon added.

Muslims make up France’s largest religious minority, with most of them tracing their origins to former French colonies in North Africa.