An 84-year-old man with far-right ties was arrested Monday in connection with the shooting of two people outside a mosque in France who reportedly saw him trying to set fire to the building.

Claude Sinke allegedly opened fire on two men, ages 74 and 78, who saw him trying to set fire to the door of a mosque in Bayonne, in southwestern France, Agence France-Presse reported. Bayonne Mayor Jean-Rene Etchegaray told AFP at the scene that the suspect "approached the building by car and threw an incendiary device against the side door of the mosque."

"The two people came out, he shot at them, hitting one in the neck and the other in the chest and arm," he added. "He then fled."

A police officer stands next to the entrance a mosque after an incident in Bayonne, southwestern France on Monday. French authorities say a suspect has been arrested for allegedly shooting and seriously injuring two elderly men who caught him trying to set fire to a mosque's door. (AP Photo/Str)

A police officer stands next to the entrance a mosque after an incident in Bayonne, southwestern France on Monday. French authorities say a suspect has been arrested for allegedly shooting and seriously injuring two elderly men who caught him trying to set fire to a mosque's door. (AP Photo/Str)

The men were taken to a hospital with serious injuries, the Pyrenees-Atlantique Police said in a statement.

Sinke also tried to set fire to a car outside the mosque before fleeing, authorities said. He was later arrested at his home and admitted to being the shooter, a source close to the investigation told AFP.

French President Emmanuel Macron condemned the attack in a tweet.

"I address my thoughts to the victims," he wrote. "The Republic will never tolerate hatred. Everything will be done to punish the perpetrators and protect our compatriots of the Muslim faith. I commit myself to it."

The attack came hours after Macron urged Frances' Muslim community to fight against "separatism." This, weeks after a fatal knife attack at HQ by a Paris police employee who'd converted to Islam.

"It is a fact that a form of separatism has taken root in some places in our Republic, in other words a desire to not live together and to not be in the Republic," the centrist leader said.

Sinke was a candidate for Marine' Le Pen's National Front in 2015 in local elections, the news outlet reported. He has since left the movement, according to local media reports.

In a tweet, Interior Minister Christophe Castaner expressed his "solidarity and support to the Muslim community."

CLICK HERE TO GET THE FOX NEWS APP

Le Pen, a former French presidential candidate who advocated hardline immigration policies, has been highly critical of Islam. She described the alleged attack as "an unspeakable act".

Sinke's actions were "absolutely contrary to the values of our movement," she said.