The violent end to the simultaneous stand-offs northeast of Paris and at a Jewish supermarket in the capital followed a police operation of unprecedented scale as France tackled one of the worst threats to its internal security in decades.
With one of the gunmen saying shortly before his death that he was funded by al Qaeda, President Francois Hollande warned that the danger to France - home to the European Union's biggest communities of both Muslims and Jews - was not over yet.
"These madmen, fanatics, have nothing to do with the Muslim religion," Hollande said in a televised address. "France has not seen the end of the threats it faces."
Following heavy loss of life over three consecutive days, which began with the attack on Charlie Hebdo when 12 people were shot dead, French authorities are trying to prevent a rise in vengeful anti-immigrant sentiment.
Hollande denounced the killing of the four hostages at the kosher supermarket in the Vincennes district of Paris. "This was an appalling anti-Semitic act that was committed," he said.
Officials said Cherif Kouachi and his brother Said, both in their thirties, died when security forces raided a print shop in the small town of Dammartin-en-Goele, northeast of Paris, where the chief suspects in Wednesday's attack had been holed up. The hostage they had taken was safe, an official said.
Automatic gunfire rang out, followed by blasts and then silence as smoke could be seen billowing from the roof of the print shop. Amid thick fog, a helicopter landed on the building's roof, signaling the end of the assault. A government source said the brothers had emerged from the building and opened fire on police before they were killed.
Before his death, one of the Kouachi brothers told a television station he had received financing from an al Qaeda preacher in Yemen.
"I was sent, me, Cherif Kouachi, by Al Qaeda of Yemen. I went over there and it was Anwar al Awlaki who financed me," he told BFM-TV by telephone, according to a recording aired by the channel after the siege was over.
Al Awlaki, an influential international recruiter for al Qaeda, was killed in September 2011 in a drone strike. A senior Yemeni intelligence source earlier told Reuters that Kouachi's brother Said had also met al Awlaki during a stay in Yemen in 2011.
Minutes after the print shop assault, police broke the second siege at the supermarket in eastern Paris. Four hostages died there along with the gunman, Amedy Coulibaly.
Coulibaly also called BFM-TV before he died to claim allegiance to Islamic State, saying he wanted to defend Palestinians and target Jews.
Coulibaly said he had jointly planned the attacks with the Kouachi brothers, and police confirmed they were all members of the same Islamist cell in northern Paris.
Police had already been hunting 32-year-old Coulibaly along with a 26 year-old woman after the killing on Thursday of a policewoman. The woman, Hayat Boumeddiene, remains on the run.
Altogether 17 victims have died along with the three hostage-takers since Wednesday. France plans a unity rally to protest on Sunday against the attacks. Among those who plan to attend are German Chancellor Angela Merkel, Prime Ministers David Cameron of Britain, Matteo Renzi of Italy and Mariano Rajoy of Spain, and European Commission president Jean-Claude Juncker.
President Barack Obama also expressed U.S. support. "I want the people of France to know that the United States stands with you today, stands with you tomorrow," he said.
World Jewish Congress President Ronald Lauder joined the condemnations, saying "Jewish life in France under threat if terror does not stop".
HOSTAGES RUSHED OUT
News footage of the kosher supermarket showed dozens of heavily armed police officers massed outside two entrances. The assault began with gunfire and a loud explosion at the door, after which hostages were rushed out.
Reuters photographs taken from long distance showed a man holding an infant and looking distressed being herded into an ambulance by police. Others were carried out on stretchers.
French authorities have mobilized a force of nearly 90,000 since Wednesday's attack on Charlie Hebdo, a weekly that has long courted controversy by mocking Islam and other religions and political leaders.
A witness said one of the gunmen in Wednesday's attack was heard to shout: "We have killed Charlie Hebdo! We have avenged the Prophet!"
The Kouachi brothers are believed to be the hooded gunmen who shot dead some of France's top satirical cartoonists along with two police officers.
Security sources said the French-born brothers of Algerian origin had been under surveillance and had been placed on European and U.S. "no-fly" lists.
The violence raised questions about surveillance of radicals, far-right politics, religion and censorship in a land struggling to integrate part of its five million-strong Muslim community.