The attacker, named as Ziyed Ben Belgacem, arrived at Orly airport on Saturday morning, threw down a bag containing a can of petrol and seized hold of a woman air force member who was part of a military patrol at the airport, Paris prosecutor Francois Molins said.
Using the servicewoman as a shield, he put his air pistol to her head and shouted at other soldiers with her: "Put down your guns. Put your hands on your head. I am here to die for Allah. In any case, there will be deaths."
The other soldiers then shot and killed Belgacem.
Molins said the assailant, who tried to grab the woman's Famas assault rifle, seemed bent on carrying out a serious attack.
"Given the violence that is shown in the (CCTV) pictures ... you sense that he was determined to go through with it," Molins told a news conference. "Everything leads one to believe he wanted to seize the Famas so that there were deaths and then to fire at people."
On his body, police found a Koran and 750 euros in cash. At his home, they found several grams of cocaine, a machete and some foreign currency, Molins said.
Prosecutors are investigating a number of terrorism-related offences, including attempted murder.
Belgacem's choice of target and evidence that he had been radicalised justified launching a terrorism investigation, Molins said.
Belgacem's father, brother and a cousin are in police custody, Molins said.
On The Radar
Belgacem, 39, was already on the authorities' radar. They spotted him as a radicalised Muslim when he served a prison term several years ago for drug-trafficking.
Several hours earlier, Belgacem shot and wounded a police officer with his air pistol after a routine traffic stop north of Paris before fleeing, officials said.
After the first incident, Belgacem called his father and brother saying he had done something stupid, the prosecutor said.
Later he entered a bar in Vitry-sur-Seine on the other side of Paris and opened fire with his air gun without hitting anyone. He also stole a car before arriving at the airport.
These include coordinated bombings and shootings in November 2015 in Paris when 130 people were killed and scores injured.
With the country in the throes of a highly-charged election campaign before a two-round presidential election in April and May, the attacks will fuel the political debate.
Conservative presidential candidate Francois Fillon said in a video message that France was in a "situation of virtual civil war" and there was no justification for lifting a state of emergency in place since the November 2015 attacks, after the justice minister said this week conditions were in place for lifting it.
Far-right-wing candidate Marine Le Pen, running on an anti-immigration, anti-EU ticket, said the death of the Orly airport attacker, who she said was a multiple repeat offender, had averted a "possible massacre".
"Our government is overwhelmed, stunned, paralysed like a rabbit in the headlights," she told an election rally.
One witness, who gave only his first name of Dominique, said he saw a man seize the woman soldier by the arm at the airport and take hold of her weapon.
"We ran off, down the staircase. Afterwards, we heard two shots," he told BFM TV.
Flights from Orly were suspended for several hours after the incident.
Prince William, second-in-line to the British throne, and his wife Kate, who finished a two-day visit to Paris on Saturday stuck to their plans despite the attack.
President Francois Hollande said the case had shown the need for the "Sentinelle" security operation brought in after 2015 attacks. The soldiers involved were patrolling the airport as part of the "Sentinelle" operation.
Last month, Egyptian Abdullah Reda al-Hamahmy, 29, was shot and seriously wounded near the Louvre museum when he launched himself at a group of soldiers, crying out "Allahu Akbar" (God is greatest).
(Reporting by Gus Trompiz, Emmanuel Jarry, John Irish, Brian Love, Bate Felix, Simon Carraud; editing by Richard Balmforth and Adrian Croft)