A French prosecutor says that a gunman who claimed responsibility for a radical Islam-inspired killing spree was shot in the head by police.

Francois Molins says Mohamed Merah, a 23-year-old Frenchman of Algerian origin, filmed all three of his attacks in recent days that killed three Jewish schoolchildren, a rabbi and three paratroopers.

Mr. Molins said on Thursday that “everything was done to try to arrest him alive.”

Police entered his apartment following a 32-hour standoff. Mr. Molins says the gunman came out of the bathroom shooting wildly and aggressively and was shot in the head as he jumped out of the window.

Earlier, Interior Minister Claude Gueant said the suspect was found holed up in the bathroom after police entered his apartment on Thursday morning to end a 32-hour standoff. Police and the suspect exchanged gunfire before Merah died, with two police wounded in the firefight.

Police said, in hours of negotiations on Wednesday when the standoff first began, Merah admitted to being proud of killing a rabbi, three Jewish children and three French paratroopers in three separate motorcycle shooting attacks. They are believed to be the first killings inspired by Islamic radical motives in France in more than a decade.

Elite police squads set off sporadic blasts throughout the night and into the morning some blew off the apartment’s shutters in what officials described as a tactic aimed to pressure Merah to give up.

A new set of detonations, known as flash bangs, resounded at 10.30 a.m. (3 p.m. IST), beginning the end to the standoff.

“We still want him alive so he can be tried and so the families can mourn properly,” Foreign Minister Alain Juppe told Europe 1 radio before the firefight on Thursday.

Police said Merah told negotiators he killed a rabbi and three young children at a Jewish school on Monday and three French paratroopers before that avenge the deaths of Palestinian children and to protest the French Army’s involvement in Afghanistan, as well as a government ban last year on face-covering Islamic veils.

French authorities like others across Europe have long been concerned about “lone-wolf” attacks by young, Internet-savvy militants who find radical beliefs online, since they are harder to find and track.

“Lone wolves are formidable adversaries,” Mr. Gueant said.

Even before Merah’s death, the lawyer who had defended him for years on a series of criminal charges predicted a dramatic and somber end to the standoff.

“He wants to show he is exceptional, omnipotent, and this approach can only end up as something tragic,” Christian Etelin said on news channel i-Tele on Thursday.

“He felt rejected by the periods of detention he was handed out, and for his wish to defend France in the Army. Now, he is in a process of hate,” Mr. Etelin said.

Police said they had to capture Merah to prevent more deaths.

“He has no regrets, except not having more time to kill more people, and he boasts that he has brought France to its knees,” prosecutor Francois Molins told a news conference on Wednesday.

More In: International | News