The 84-year-old attacker, a former soldier, shot at people inside the mosque while people were praying, injuring two elderly men who were taken to hospital with serious injuries, according to newspaper Sud Ouest.
The man was arrested near his home after the incident that also involved a small explosion, presumably from a petrol can set on fire near the place of worship on Monday afternoon.
Several shots were heard in front of the mosque Thursday afternoon when people were leaving the place of worship and two people, including the imam Rachid Eljay, were injured. They were taken to a nearby hospital and both are "doing okay," according to reports.
The regional governor said the suspect also set a car ablaze before fleeing the scene in the southwestern city of Bayonne. The victims, aged 74 and 78, were hospitalized. The motive of the suspect, who local media said was 84, was not immediately known.
President Emmanuel Macron condemned the "odious attack" in a tweet and vowed to "do everything" to punish attackers "and protect our Muslim compatriots."
France "will never tolerate hate," he said. The man wrote days ago to the region's prosecutor saying he wanted to file a complaint against Macron, according to the Sud Ouest newspaper which received a copy of the letter.
The paper printed only the top of the missive, dated Oct. 25, because of its "discriminatory, xenophobic and defamatory character." His complaint against the centrist president was not immediately clear. The letter made no mention of any intention to attack the mosque, the paper said.
The newspaper identified the suspect as Claude Sinke, a candidate in 2015 departmental elections for France's far-right National Rally party, then known as the National Front.
Interior Ministry election results from 2015 show that a Claude Sinke ran unsuccessfully in his community of Seignanx.
The National Rally acknowledged that the suspect had been a candidate in the 2015 elections before being kicked out of the local federation for speaking in a way "deemed contrary to the spirit and the political line" of the anti-immigration party.
Interior Minister Christophe Castaner, who is in charge of the nation's religions, called for "solidarity and support for the Muslim community."
National Rally leader Marine Le Pen distanced her party from the incident. "These crimes must be treated with the most total severity," she tweeted.
Two people were injured on Monday after a man fired shots at a mosque in Bayonne in southwestern France before being arrested, regional authorities said, Azvision.az reports citing Xinhua.
At 15:20 local time (1420 GMT), the suspect was trying to set fire to the door of the mosque, then he shot two men who surprised him and tried to stop his attempt, the Pyrenees-Atlantiques prefecture said in a statement.
The armed man, who torched a vehicle before he ran away, was arrested shortly after near his home in Les Landes, it said.
Aged 78 and 74, the two victims were transferred to hospital, according to the statement.
Local media reports say the suspect was an elderly man in his 80s and had reportedly been a political candidate for Marine Le Pen's far-right National Rally party in provincial elections in 2015.
A firearm and a gas canister were reportedly found in his car.