France is emerging from one of its worst security crises in decades after three days of attacks by gunmen brought bloodshed to the capital Paris and its surrounding areas. It began with a massacre at the offices of satirical magazine Charlie Hebdo on Wednesday 7 January and ended with a huge police operation and two sieges two days later.

Here is what we know about how events unfolded:

Police, alerted to a shooting incident, arrived at the scene as the gunmen were leaving the building.

Witnesses said they had heard the gunmen shouting "We have avenged the Prophet Muhammad" and "God is Great" in Arabic while calling out the names of the journalists.

The men opened fire and killed the editor's police bodyguard, Franck Brinsolaro, before asking for editor Stephane Charbonnier , known as Charb, and other four cartoonists by name and killing them, along with three other editorial staff and a guest attending the meeting.

One of the magazine's cartoonists, Corinne Rey , described how she had just returned to the building after picking up her daughter from day care when the gunmen threatened her, forcing her to enter the code for the keypad entry to the newsroom on the second floor - where a weekly editorial meeting was taking place.

Once inside, the men - now known to be brothers Cherif and Said Kouachi - asked maintenance staff in reception where the magazine's offices were, before shooting dead caretaker Frederic Boisseau.

They burst into number 6, Rue Nicolas-Appert, before realising they had the wrong address. They then moved down the street to number 10 - where the Charlie Hebdo offices are on the second floor.

At, a black Citroen C3 drove up to the Charlie Hebdo building in Rue Nicolas-Appert. Two masked gunmen, dressed in black and armed with Kalashnikov assault rifles got out and approached the offices.

The getaway car was found abandoned - after apparently crashing into another vehicle about 3km (1.8 miles) north of the Charlie Hebdo offices. Investigators found Molotov cocktails and two jihadist flags in the car, French media report.

One of the attackers then walked up to the injured officer on the pavement and shot him dead at close range. The gunman returned to the car and drove away with his accomplice.

The black Citroen is thought to have driven south down the Boulevard Richard Lenoir, before doubling back on the northern carriageway. The car stopped and video footage shows the gunmen getting out of the vehicle and shooting police officer Ahmed Merabet who is on a nearby pavement.

The police car's windscreen was riddled with bullets but the officers escaped unhurt.

Journalists and workers who had taken refuge on nearby rooftops filmed the gunmen getting out of the car and shooting at the police vehicle, before driving off.

A police car blocked the gunmen's escape route down the narrow street Allee Vert and the gunmen opened fire.

Paris was put on maximum alert and a major security operation was launched with an additional 500 police deployed to the streets of the capital.

The attackers then hijacked another car, a grey Renault Clio, and disappeared.

The gunman, armed with a machine-gun and a pistol, shot dead a policewoman and injured a man before fleeing. The French authorities initially dismissed any suggestion of a link between the shooting and the Charlie Hebdo killings, but later confirmed the two were connected.

At about 08:45 local time the following day (Thursday 8 January), as police continued their search for the Charlie Hebdo attack suspects, a lone gunman shot two people in the southern Paris suburb of Montrouge.

On Friday morning, after commandeering another vehicle in the town of Montagny Sainte Felicite, Said Kouachi was hit in the neck in a shootout with police. A high speed chase ensued as the police pursued the pair along the N2 road towards Paris ending as the brothers sought refuge in a printworks in Dammartin-en-Goele.

French media say Cherif was a convicted Islamist who was jailed in 2008 and had long been known to police for militant activities.

In a bulletin informing the public that arrest warrants had been issued for Cherif and Said Kouachi , aged 32 and 34, police said they should be considered armed and dangerous.

The brothers then apparently led police on a chase around north-eastern France, with the anti-terror operation moving to nearby Crepy-en-Valois and the villages of Corcy and Longpont.

The men - said by the station manager to have been armed with Kalashnikovs and rocket-propelled grenade launchers - fired shots as they stole food and petrol from the roadside stop. They drove off towards Paris in the same Renault Clio car hijacked after the attack on the Charlie Hebdo offices.

A major breakthrough in the hunt for the Charlie Hebdo suspects came at about at 10:30 local time the day after the attacks, when the fugitives robbed a service station near Villers-Cotterets, in the Aisne region, north-east of Paris.

On the morning of Friday 9 January, the manhunt entered its final phase as police closed in on the Charlie Hebdo attack suspects at Dammartin-en-Goele, 35km (22 miles) from Paris.

The fugitives were holed up in a printing firm called Creation Tendance Decouverte on an industrial estate on the outskirts of the town.

Hundreds of armed officers surrounded the building, where Said and Cherif Kouachi - the former bleeding from a bullet wound to the neck - had fled following a car chase.

Elite forces deployed snipers, helicopters and military equipment - sealing off any means of escape for the suspected killers and beginning a tense, eight-hour stand-off.

Just before 17:00 local time, the impasse ended as smoke was seen rising from the printworks amid explosions and gunfire. The two brothers - , the impasse ended as smoke was seen rising from the printworks amid explosions and gunfire. The two brothers - who had told local media they would die "martyrs'" deaths - emerged from the building, firing at police. Both suspects were killed and two police officers were injured.

media caption Dramatic footage showed special forces approaching the building in which the Kouachis were holed up

It later emerged that the brothers had released a hostage and that another man had survived the incident by hiding in the building's cafeteria, unknown to the attackers, apparently communicating intelligence to police by text message.

5. Supermarket hostage-taking and siege

Meanwhile, in Paris, another siege was under way.

While the Kouachi brothers were surrounded at the printworks, the French authorities had confirmed there was a "connection" between the Charlie Hebdo killings and the shooting of the policewoman in Montrouge.