Two sieges in France have been brought to a bloody end, with three gunmen and four hostages killed.
Two brothers who killed 12 in an attack on Charlie Hebdo magazine on Wednesday were shot dead as they fled a warehouse north of Paris, firing at police.
Shortly afterwards in eastern Paris, anti-terrorist forces stormed a kosher supermarket where hostages were being held by a gunman with reported links to the brothers.
The gunman and four hostages died.
French police believe the captives were killed before the assault on the Hypercasher supermarket near Porte de Vincennes, Paris prosecutor Francois Molins told reporters late on Friday.
Four hostages were seriously injured and 15 were rescued unhurt. Two police officers were injured.
The operation was launched after the end of the siege in Dammartin-en-Goele, 35km (22 miles) north of Paris.
The two brothers there, Cherif and Said Kouachi, came out of the building firing at police and were killed. Two police officers were injured.
One hostage there had earlier been released and a second employee, who was hiding in the building’s cafeteria, was freed by police after the shooting ended.
French President Francois Hollande described the events as “a tragedy for the nation”.
In a televised address, he thanked the security forces for their “bravery [and] efficiency”, but added that France still faced threats. “We have to be vigilant. I also ask you to be united – it’s our best weapon,” he said.
“We must be implacable towards racism,” he added, saying that the supermarket attack was an “appalling anti-Semitic act”.
“Those who committed these acts, these fanatics, have nothing to do with the Muslim faith.”
Meanwhile, French Prime Minister Manuel Valls said there had been a “clear failing” in French intelligence.
“If 17 people die, this means mistakes have been made,” he said, including those killed in attacks on Wednesday and Thursday in the toll.
Separately, a man who took two women hostage in a jewellery store in the southern city of Montpellier on Friday, surrendered to police early on Saturday. Police said his motive was not known but that there was no link to Islamist violence.
The police assaults came after three tense days in France.
The Kouachi brothers killed 12 people and injured 11 more in Wednesday’s attack on the office of Charlie Hebdo, a satirical magazine.
The unprecedented attack shocked France and there has been an outpouring of sympathy and solidarity worldwide.
The brothers then went on the run, before being surrounded at Dammartin.
The hostage taker in Paris has been named as Amedy Coulibaly, 32. It is not clear whether he had an accomplice but police are looking for his partner, Hayat Boumeddiene, 26.
Coulibaly knew one of the Charlie Hebdo attackers and their respective partners had spoken on the phone more than 500 times, Mr Molins said.
During Friday’s siege, Coulibaly had threatened to kill his captives if police attempted to capture the brothers, he added.
Earlier on Friday, a man claiming to be Coulibaly told French TV station BFMTV that he was a member of the Islamic State militant group, and that he had “co-ordinated” his attack with the Kouachi brothers.
Coulibaly has been linked by DNA tests to the killing of a policewoman in the southern suburb of Montrouge on Thursday.
Late on Friday, the Yemen branch of al-Qaeda (AQAP) released an audio message praising the attacks in France but stopped short of claiming responsibility for the assault on the offices of Charlie Hebdo.
AQAP senior leader Sheikh Harith al-Nadhari said “some in France have misbehaved with the prophets of God,” adding that “God’s faithful soldiers” had taught them “the limits of freedom of speech”.