Police were on Saturday hunting for a man who, draped in a Palestinian flag, was suspected of setting fires at a synagogue in southern France and triggering an explosion that injured a police officer.
Authorities said the incident was being treated as a potential terror attack and "all means" were being deployed to find the perpetrator.
France's interim Prime Minister Gabriel Attal visited the site along with Interior Minister Gerald Darmanin and said: "We narrowly avoided an absolute tragedy."
Attal said that "if the synagogue had been filled with worshippers... there probably would have been human victims."
Security around Jewish sites was tightened following the attack early on Saturday at Beth Yaacov synagogue in the seaside resort of La Grande Motte, near the city of Montpellier.
Two cars outside the synagogue were set alight, with a gas canister then likely exploding inside one of the vehicles, police said.
Two fires were also started at the entrance of the synagogue, but were quickly put out, with two doors damaged, investigators said.
The wounded police officer was injured by the blast after rushing to the scene after the fires were started, police said.
President Emmanuel Macron called the incident "an act of terror", adding on X: "The fight against anti-Semitism is a daily fight."
He said "all means are being deployed" to apprehend the suspect.
La Grande Motte's mayor, Stephan Rossignol, said that CCTV had picked up images of an individual setting fire to the cars.
On part of the footage, watched and authenticated by AFP, a man is seen with a Palestinian flag draped around his waist, his head covered by a red Palestinian keffiyeh.
The man carried two bottles filled with a yellowish liquid. The footage also seems to show the contours of a handgun.
Sources close to the investigation said the suspect left the scene hurriedly on foot.
The fires and explosion came amid a heightened state of alert in France and other European countries because of the war in Gaza.
Attal said France's national anti-terror prosecutors had been tasked with probing the incident.
"La Grande Motte's synagogue was the target of an attack this morning," Attal said in a post on X. "An anti-Semitic act. Once again, our Jewish fellow citizens are being targeted."
Darmanin called the incident "an obviously criminal act".
He said "all means are being deployed to find the perpetrator".
The police presence outside Jewish sites in France would be increased following the explosion, the minister added.
The blast occurred during Shabbat, the Jewish day of rest that runs from sunset Friday to sunset Saturday, with many attending synagogue services.
There was, however, no religious service ongoing at the time of the incident, a police source said. A rabbi and four other people were inside the synagogue at the time but all were unharmed, investigators said.
The town of La Grande Motte has about 8,500 permanent residents but the population swells during the summer tourism season.
Darmanin said this month that the government had counted 887 anti-Semitic acts in France in the first half of 2024, nearly three times as many as in the same period in 2023.
France is home to the biggest Jewish population outside Israel and the United States, and also to the largest Muslim community in the European Union.
The use of a gas canister "in a car at a time when worshippers are expected to arrive at the synagogue is not simply a criminal act", CRIF president Yonathan Arfi told AFP. "This shows an intention to kill."