Police stormed a house and killed a gunman whose murders of Jewish schoolchildren and soldiers traumatised France and briefly halted the presidential election campaign.
Officers from an elite unit moved in after a 32-hour siege, killing the self-proclaimed Al-Qaeda militant as he tried to shoot his way out of his apartment in the southwestern city of Toulouse.
An Al-Qaeda linked group, Jund al-Khilafah, claimed responsibility on jihadist websites for the killings by a man whom French President Nicolas Sarkozy dubbed a "monster".
The seven murders shocked France, home to western Europe's largest Jewish and Muslim minorities, provoking a debate about intolerance and security failures in the midst of a hard-fought presidential election campaign.
Mohamed Merah had told police he had carried out the three recent attacks, the first two in which he shot dead three soldiers and the final one on Monday when he killed three children and a teacher at a Jewish school.
France's chief anti-terror prosecutor Francois Molins confirmed that Merah had filmed the attacks with a video camera.
On Thursday morning the streets of a residential area in Toulouse resounded with the sound of intense gunfire in a shattering finale to the standoff, which had begun before dawn the previous day.
As police from the elite RAID force stormed his apartment the 23-year-old burst out of the bathroom wearing a black djellaba, a traditional loose-fitting North African robe, and a bullet-proof vest.
He opened fire on the police before jumping out the window of his first-floor apartment, still firing as he fell. Molins said Merah was shot in the head.
"He was dead by the time he hit the ground," a police source told AFP.
Police had been told to do everything possible to take Merah alive but had no choice but to open fire, said Molins.
"He literally launched an assault, rushing forward with a Colt .45 and continuing to fire as he jumped through the window, until he was shot in the head," he told journalists.
Interior Minister Claude Gueant said: "A RAID officer who is used to this kind of thing told me that he had never seen such a violent assault."
"It's the first time in my life I've seen someone, as we launch an assault, launch an assault against us," RAID head Amaury de Hauteclocque said.
Molins said five officers had been wounded during the operation: two during the initial pre-dawn raid on Wednesday, and three on Thursday. None of the injuries was life threatening, he said.
He said police were searching for "any accomplices who may have convinced him to commit these acts or provided him with the means to commit them."
Sarkozy told a rally in Strasbourg as he resumed his re-election campaign that "these crimes were the work of a fanatic and a monster".
He vowed earlier in a televised address to crack down on extremism, saying he wanted legal action against people who regularly consulted jihadist websites or travelled abroad for indoctrination.
Molins said Merah had said his attacks were to avenge Palestinian deaths and to punish France for its military presence in Afghanistan and the ban on full-face veils.
The militant had claimed to have been trained by Al-Qaeda in Waziristan, a tribal area of Pakistan known as a haven for Islamist insurgents connected to Taliban guerrillas.
He had twice travelled to the region, on one occasion getting arrested by Afghan police and handed over to US army troops, said Molins. They put him on a flight back to France.
A US intelligence official told AFP that Merah was on America's "no-fly" list, banned from boarding flights to or from the country.
Officials in Afghanistan and Pakistan told AFP they could not immediately confirm Merah had visited either country or had been held by US-led forces.
Jund al-Khilafah said in its statement that "the Frenchman carried out an operation that shook the foundations of the Zionist Crusaders.
"We claim responsibility for these operations," said the statement. Israel's "crimes... will not go unpunished," it added.
According to US monitoring group SITE, Jund al-Khilafah has previously claimed attacks in Afghanistan and Kazakhstan.
Police and prosecutors said earlier they had detained Merah's mother, brother and his brother's girlfriend as part of their inquiry. Sources said Merah had been known to the domestic security service for some years.
Merah had filmed the killings with a camera attached to a chest harness, Molins confirmed Thursday. Officers had viewed the footage.
During the first shooting of a paratrooper in Toulouse on March 11, he can be heard saying "You kill my brothers, now I'm killing you", as he fired two bullets into his victim, Molins said.
During the March 15 attack, when he killed two other paratroopers in nearby Montauban, he can be seen gunning down the soldiers before driving off on a scooter shouting "Allahu Akbar!" (God is Greatest!), Molins said.
On Monday the gunman, again wearing a motorcycle helmet and riding a scooter, attacked the Ozar Hatorah Jewish school in Toulouse, killing a religious studies teacher, his two young sons and a seven-year-old girl.
The siege interrupted the hard-fought campaign for France's April-May presidential vote, but Sarkozy resumed his re-election bid with a rally in the city of Strasbourg Thursday evening.
Socialist candidate Francois Hollande had been leading in polls to win a second-round runoff on May 6. But Sarkozy has caught up and they are running neck-and-neck before the April 22 first-round vote.
Late Thursday, Hollande spoke of a "failure" that had allowed Merah to escape surveillance, raising questions over the handling of his case.