PARIS (AP) — With explosions and gunfire, security forces ended a three-day terror rampage around Paris, killing the two al-Qaida-linked brothers who staged a murderous rampage at a satirical newspaper, and an associate who seized a kosher supermarket to try to help them escape.

It was the worst terror spree France has seen in decades. At least seven people were killed Friday — the three terrorists and at least four hostages — two days after 12 people were massacred in the newspaper attack. Sixteen hostages were freed on Friday, one from the printing plant and 15 from the grocery store.

The fate of a fourth suspect — the wife of the supermarket attacker — remained unclear, and Paris shut down a famed Jewish neighborhood amid fears that a wider terror cell might launch further attacks. France’s interior minister warned his shaken nation to remain “extremely vigilant.”

The four attackers had ties to each other and to terrorism that reached back years and extended from Paris to al-Qaida in Yemen. They epitomized Western authorities’ greatest fear: Islamic radicals who trained abroad and came home to stage attacks.

Said and Cherif Kouachi, the brothers who attacked newspaper Charlie Hebdo on Wednesday, came out with their guns blazing Friday evening after an all-day hostage siege at a printing plant northeast of Paris, a French police official said. They were killed and their hostage was freed, authorities said.

An accomplice, Amedi Coulibaly, took at least five hostages Friday afternoon at a kosher grocery in Paris — then died in a nearly simultaneous raid there, said Gael Fabiano of the UNSA police union. Several people were rescued from the Porte de Vincennes grocery store.

Police said at least four hostages there were killed.

France has been on high alert since the massacre Wednesday in Paris at the satirical newspaper Charlie Hebdo that left 12 people dead. Behind that attack were Cherif Kouachi, 32, and his 34-year-old brother Said.

The next day, a gunman shot a policewoman to death in a gunfight just south of Paris. Police later identified the gunman as Coulibaly, who had been a co-suspect with Cherif Kouachi in a court case involving terrorism that never made it to trial.

The Kouachi brothers led police on a chase around northeast France, robbing a gas station Thursday and stealing a car Friday morning before seizing hostages at a printing plant in Dammartin-en-Goele, a small industrial town near Charles de Gaulle airport.

Friday afternoon, explosions and gunshots rang out and white smoke rose outside as a police SWAT team clambered onto the roof.

Audrey Taupenas, spokeswoman for the town near the Charles de Gaulle airport, said the brothers had died in the clash.

“They said they want to die as martyrs,” Yves Albarello, a local lawmaker inside the command post, told French television station i-Tele.

Minutes before the storming, Coulibaly had threatened to kill his five hostages if French authorities launched an assault on the two brothers, a police official said.

Trying to fend off further attacks, the Paris mayor’s office shut down all shops along Rosiers Street in the city’s famed Marais neighborhood in the heart of the tourist district. Hours before the Jewish Sabbath, the street is usually crowded with shoppers — French Jews and tourists alike. The street is also only a kilometer (half a mile) from Charlie Hebdo’s offices.

At the kosher grocery near the Porte de Vincennes neighborhood in Paris, the gunman burst in shooting just a few hours before the Jewish Sabbath began, declaring “You know who I am,” the official recounted. The attack came before sundown when the store would have been crowded with shoppers.

Paris police released a photo of Coulibaly and his wife, Hayet Boumddiene, who the official said was his accomplice.

Several people wounded when the gunman opened fire in the grocery store were able to flee and get medical care, the official said.

One hundred students were locked down in nearby schools and the highway ringing Paris was closed.

Cherif Kouachi was convicted of terrorism charges in 2008 for ties to a network sending jihadis to fight U.S. forces in Iraq.

A Yemeni security official said his 34-year-old brother, Said Kouachi, is suspected of having fought for al-Qaida in Yemen. Another senior security official said Said was in Yemen until 2012.

Both officials spoke to The Associated Press on condition of anonymity because of an ongoing investigation into Kouachi’s stay in Yemen.

Both brothers were also on the U.S. no-fly list, a senior U.S. counterterrorism official said, speaking on condition of anonymity because the official was not authorized to discuss foreign intelligence publicly.

The satirical weekly Charlie Hebdo had long drawn threats for its depictions of Islam, although it also satirized other religions and political figures. The weekly paper had caricatured the Prophet Muhammad, and a sketch of Islamic State’s leader was the last tweet sent out by the irreverent newspaper, minutes before the attack.

Eight journalists, two police officers, a maintenance worker and a visitor were killed in the newspaper attack, including the paper’s editor. Charlie Hebdo plans a special edition next week, produced in the offices of another paper.

Authorities around Europe have warned of the threat posed by the return of Western jihadis trained in warfare. France counts at least 1,200 citizens in the war zone in Syria — headed there, returned or dead. Both the Islamic State group and al-Qaida have threatened France, home to Western Europe’s largest Muslim population.

———

Associated Press writers Elaine Ganley, Sylvie Corbet, Jamey Keaten and Samuel Petrequin in Paris; Raphael Satter and Trung Latieule in Dammartin-en-Goele, Jill Lawless in London; and Ken Dilanian in Washington contributed to this report.