French soldiers have shot and killed a man who wrestled a colleague to the ground and tried to steal her rifle at Orly Airport in Paris.
The incident forced the busy terminals to close and evacuate. Hundreds of passengers were trapped aboard flights that had just landed.
The 39-year-old Frenchman killed first fired bird shot at police during an early morning traffic stop before speeding away and heading for the airport south of Paris.
Authorities say he had a long criminal record and was previously flagged for possible radicalism.
In the public area of the airport's South Terminal, the man wrestled the soldier, on foot patrol, and tried to snatch away her rifle, authorities said.
The French defence minister, Jean-Yves Le Drian, said the patrol's other two members opened fire. He said the soldier managed to keep hold of her weapon.
"Her two comrades thought it was necessary - and they were right - to open fire to protect her and especially to protect all the people who were around," Mr Le Drian said.
The attack further rattled France, which remains under a state of emergency after attacks over the past two years that have killed 235 people.
Witnesses described panicked bystanders fleeing, flights halting, traffic chaos and planes under lockdown.
French authorities, however, stressed that security planning - reinforced across the country in the wake of repeated attacks - worked well.
The soldier was "psychologically shocked" but unhurt by the "rapid and violent" assault, said Colonel Benoit Brulon, a spokesman for the military force that patrols public sites in France.
"We'd already registered our bags when we saw a soldier pointing his gun at the attacker who was holding another soldier hostage," said Pascal Menniti.
Authorities said at least 3,000 people were evacuated from the airport.
Hundreds of passengers were also confined for hours aboard 13 flights, and 15 other flights were diverted to Charles de Gaulle, the airport authority said.
An official connected to the investigation confirmed French media reports that identified the attacker as Ziyed Ben Belgacem, born in France in 1978.
After the airport attack, his father and brother were detained by police for questioning.
The anti-terrorism section of the Paris prosecutors' office immediately took over the investigation. It said the attacker had a record of robbery and drug offences.
He did not appear in a French government database of people considered potential threats to national security but prosecutors said he had already crossed authorities' radar for suspected Islamic extremism.
His house was among scores searched in November 2015 in the aftermath of suicide bomb-and-gun attacks that killed 130 people in Paris. Those searches targeted people with suspected radical leanings.
French president Francois Hollande said investigators will determine whether the attacker "had a terrorist plot behind him".
He ruled out any link between the attack and the French presidential election, noting the country has been battling extremist threats for years.
About 90 minutes before the airport attack at 8.30am, the man was stopped by a police patrol in northern Paris because he was driving too fast, police said.
As he was showing his ID papers, the man pulled out a gun and fired bird shot at the three officers, injuring one of them in the face, police said.
Police fired back and the man fled in his car. That traffic stop at 6.50am was at Garges-les-Gonesse, north of Paris near Le Bourget airport.
The man later abandoned that vehicle at Vitry, south of Paris, and stole another at gunpoint, police said. That car was later found at Orly Airport.
A witness identified only as Dominque told BFM Television that the attacker held the soldier by the throat and held her arm and her weapon.
"We saw it was a serious situation, so we escaped," he said. "We went down the stairs and right after we heard two gunshots."
Taxi driver Youssef Mouhajra was at Orly when he heard shots, which he first thought were just a warning.
"We have become accustomed to this kind of warning, and to having the soldiers there," he said.
Then he saw people fleeing the terminal.
"I told (the passengers) let's get out of here," he said. As he drove away, he saw soldiers and police rushing toward the airport.
The military patrol was part of the Sentinelle force installed around France to protect sensitive sites after a string of deadly Islamic extremist attacks.
Saturday was at least the fourth time that Sentinelle soldiers have been targeted since the force was created.
It was set up after the deadly attack in January 2015 on the satirical magazine Charlie Hebdo in Paris and reinforced after the assaults that left 130 people dead in Paris on November 13 2015.
The shooting comes after a similar incident last month at the Louvre Museum in Paris in which an Egyptian man attacked soldiers guarding the site. He was shot and wounded and taken into custody.
It also comes just days before the first anniversary of the March 22 attacks on the Brussels airport and subway that killed 32 people and wounded hundreds of others.