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.
Analysis: Frank Gardner, BBC security correspondent
The actions of France's highly trained GIGN counter-terrorist police brought a swift end to a crisis that began 53 hours earlier with the armed raid on the Paris magazine Charlie Hebdo.
But a number of important questions remain. Was this attack planned and orchestrated from abroad and if so by whom? Is there any credence to claims made by the gunmen before they died that they were linked to al-Qaeda in Yemen and to Islamic State, two sometimes competing organisations? And what was the real target here, Charlie Hebdo or the entire French nation?
Questions are already being asked of French police and intelligence about how the two Kouachi brothers, well-known for their extremist views and already on US and European no-fly watchlists, were left free to acquire assault rifles and carry out the murderous raid on 7 January.
Beyond this, France has a deeper problem, coping with a growing number of violent jihadists who will see this week as only the beginning.
'God's faithful soldiers'
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".
How the day unfolded (all times GMT)
07:00 - The Kouachi brothers hijack a car in Montagny-Sainte-Felicite, north of Paris. They are said to be carrying weapons including a rocket launcher.
08:30 - Pursued along the N2 road towards Paris, they exchange fire with police and take refuge in a printing works in Dammartin-en-Goele. They take the manager hostage.
10:30 - The manager is released, but another employee remains in the building.
12:15 - A man identified as Amedy Coulibaly takes several people hostage at a supermarket near Porte de Vincennes in eastern Paris. Coulibaly is also suspected of having shot dead a policewoman on Thursday.
16:00 - The brothers emerge in Dammartin, opening fire on police. Both men are killed. The trapped employee is released and tells police he had been hiding on the second floor, unknown to the gunmen.
16:15 - Security forces move into the supermarket in Paris and kill Coulibaly. It emerges that four hostages at the supermarket have been killed, but 15 others are freed.
18:55 - Addressing the nation, President Hollande calls for France to "remain vigilant" and praises the "courage, bravery and efficiency" of the police forces.