Two men, aged 74 and 78, were shot and seriously injured on Monday as they tried to stop an attacker from setting a mosque ablaze in the southwestern city of Bayonne.

Police said they arrested the shooter at his home shortly after the attack.

French President Emmanuel Macron said he "firmly condemned" the "heinous" mosque attack. "The Republic will never tolerate hatred," he wrote on his Twitter account. "Everything will be done to punish the perpetrators and protect our Muslim compatriots. I commit myself to it."

According to local authorities, the suspect was trying to set the door of the mosque on fire when the two men took him by surprise. The suspect shot the two men and set a vehicle on fire as he fled the scene.

Former candidate for Le Pen's party?

Although police did not publish the man's identity, local media identified him as an 84-year-old former candidate for Marine Le Pen's far-right National Rally party. A spokesman for the party told German news agency dpa that this was true, but that the man had been expelled from the party in 2015.

Le Pen condemned the attack, tweeting that it was "an indescribable act utterly contrary to the values of our movement."

France's Interior Minister Christophe Castaner tweeted, "The suspected assailant was arrested by national police ... Solidarity and support to the Muslim community, who are understandably shocked and alarmed."

Police said they later arrested the suspect at his residence

Read more: Terrorism does not discriminate

Hours before the attack, the president had met with Muslim leaders to discuss secularism and the wearing of headscarves by some Muslim women.

mvb/msh (AFP, dpa, Reuters)

Every evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.