A man of Chechen origin who was under surveillance by French security services over suspected Islamic radicalization stabbed a teacher to death at his former high school and wounded three other people Friday in northern France, authorities said.

France raised its threat alert to its highest level, and the attack was being investigated by anti-terrorism prosecutors amid soaring global tensions over the war between Israel and Hamas. It also happened almost three years after another teacher, Samuel Paty, was beheaded by a radicalized Chechen near a Paris area school.

The suspected attacker had been under surveillance since the summer on suspicion of Islamic radicalization, French intelligence services told The Associated Press. He was detained Thursday for questioning based on the monitoring of his phone calls in recent days, but investigators found no sign that he was preparing an attack, Interior Minister Gerald Darmanin said.

“There was a race against the clock. But there was no threat, no weapon, no indication. We did our our job seriously,” Darmanin said on TF1 television. French intelligence suggested a link between the war in the Middle East and the suspect’s decision to attack, the minister said.

The suspect, identified by prosecutors as Mohamed M., was reportedly refusing to speak to investigators. Several others also were in custody Friday, national counterterrorism prosecutor Jean-Francois Ricard said. Police said the suspect’s younger brother was among those held for questioning.

President Emmanuel Macron said France had been “hit once again by the barbarity of Islamist terrorism.”

“Nearly three years to the day after the assassination of Samuel Paty, terrorism has hit a school again and in a context that we’re all aware of,” Macron said at the site of the attack in Arras, a city 185 kilometers north of Paris.

A colleague and a fellow teacher identified the dead educator as Dominique Bernard, a French language teacher at the Gambetta-Carnot school, which enrolls students ages 11-18. The victim “stepped in and probably saved many lives” but two of the wounded — another teacher and a security guard — were fighting for theirs, according to Macron.

Authorities said the third person wounded worked as a cleaner at the school. The prosecutor said the alleged assailant was a former student there and repeatedly shouted “Allahu akbar,” or “God is great” in Arabic during the attack.

Police officer Sliman Hamzi was one of the first on the scene. Hamzi said he was alerted by another officer, rushed to the school and saw a male victim lying on the ground outside the school and the attacker being taken away. He said the victim had his throat slit.

“I’m extremely shocked by what I saw,” the officer said. “It was a horrible thing to see this poor man who was killed on the job by a lunatic.”

The National Police force identified the suspect in the attack as a Russian national of Chechen origin who was born in 2003. The French intelligence services told the AP he had been closely watched since the summer with tails and telephone surveillance and was stopped as recently as Thursday for a police check that found no wrongdoing.

Friday’s attack had echoes of Paty’s slaying on Oct 16, 2020 — also a Friday — by an 18-year-old who had become radicalized. Like the suspect in Friday’s stabbings, the earlier attacker had a Chechen background; police shot and killed him.

Martin Doussau, a philosophy teacher at Gambetta-Carnot, said the assailant was armed with two knives and appeared to be hunting specifically for a history teacher. Paty taught history and geography.

“I was chased by the attacker, who … asked me if I teach history,'” said Doussau, who recounted how he barricaded himself behind a door until police used a stun gun to subdue the attacker. “When he turned around and asked me if I am a history teacher, I immediately thought of Samuel Paty.”

The school went into lockdown, and some children were held inside classrooms for hours while distraught parents gathered outside.

“My husband was in tears. There were a lot of people crying, a lot in a state of panic,” said Céline Bourgeois, whose 15-year-old son, Louis, was inside.

Prosecutors said they were considering charges of terror-related murder and attempted murder against the suspect.

Macron visited the school, stopping for a moment before the blanket-covered body of the teacher, which was in the parking lot in front of the school, then met with students.

He said police thwarted an “attempted attack” in another region of France after the teacher’s fatal stabbing. He did not provide details, but the Interior Ministry said he was referring to a man armed with a knife arrested coming out of a prayer hall in the Yvelines region west of Paris. The man’s motives weren’t immediately clear, police said.

School attacks are rare in France, and the government asked authorities to heighten vigilance at all schools across the country.

The government also increased its threat alert to its highest level Friday, allowing for larger police and military deployments to protect the country. Darmanin said there was no specific threat that prompted the move, but cited calls by extremists to attack amid the Mideast war.

He said authorities have detained 12 people near schools or places of worship since the Hamas attack on Israel last Saturday, some of whom were armed and were preparing to attack. France has heightened security at hundreds of Jewish sites around the country this week.

The suspect’s telephone conversations in recent days gave no indication of an impending attack, leading intelligence officers to conclude that the assailant decided suddenly on Friday to act, intelligence services told the AP.

The suspect’s father was expelled from France in 2018 for radicalism, the interior minister said.

An older brother is serving a 5-year prison term for terror offences. He was convicted this year of involvement in a plot for an armed attack around the presidential Elysee Palace in Paris that was thwarted by the intelligence services. Other members of the radical Islamist group were also jailed for up to 15 years. He was the group’s only Chechen.

The older brother also was a former pupil at the high school targeted Friday, according to legal records from his trial earlier this year on terror-related charges. Investigation records show that during a school class in 2016 about freedom of expression, the older brother defended a terror attack in 2015 that killed 12 cartoonists at the French satirical newspaper Charlie Hebdo.

Friday’s attack came amid heightened tensions around the world over Hamas’ attack on southern Israel and Israel’s blistering military response, which have killed hundreds of civilians on both sides.

Darmanin on Thursday ordered local authorities to ban all pro-Palestinian demonstrations amid a rise in antisemitic acts.

France is estimated to have the world’s third-largest Jewish population after Israel and the U.S., as well as the largest Muslim population in Western Europe.

A moment of silence was held at the opening of a France-Netherlands soccer match Friday night to honor victims of the Israel-Hamas fighting and the slain teacher.

Macron said the school in Arras would reopen as soon as Saturday morning, and he urged the people of France to “stay united.”

“The choice has been made not to give in to terror,” he said. “We must not let anything divide us, and we must remember that schools and the transmission of knowledge are at the heart of this fight against ignorance.”