PARIS — The bloody denouement on Friday of two hostage crises at different ends of a traumatized Paris means attention will now shift to the gaping question facing the French government: How did several jihadists — and possibly a larger cell of co-conspirators — manage to evade surveillance and execute a bold attack despite being well known to the country’s police and intelligence services?

On its own, the Wednesday morning slaughter that left 12 people dead at the satirical newspaper Charlie Hebdo represented a major breakdown for French security and intelligence forces, especially after the authorities confirmed that the two suspects, the brothers Saïd and Chérif Kouachi, had known links to the militant group Al Qaeda in Yemen.

Then on Friday, even as the police had cornered the Kouachi brothers inside a printing factory in the northeast suburbs, another militant, Amedy Coulibaly — who has since been linked to the Kouachis — stormed a kosher supermarket in Paris and threatened to kill hostages if the police captured the Kouachis. In the end, four of the hostages were killed; Mr. Coulibaly also killed a French policewoman in a southern suburb of Paris on Thursday, the police said.

“There is a clear failing,” Prime Minister Manuel Valls told French television on Friday night. “When 17 people die, it means there were cracks.”