A man who attacked soldiers at Paris Orly airport on Saturday carried a petrol can and shouted he was there to "die for Allah," Paris prosecutor Francois Molins said.

According to testimony of soldiers who witnessed the attack, the assailant put his air gun to the head of a woman soldier and shouted to 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 attacker, who Molins named as Zied ben Belgacem, was shot dead by the other soldiers. Molins said three people were being held in police custody.

He said Belgacem's choice of target and evidence that he had been radicalised justified launching a terrorism investigation.

Meanwhile a police officer was shot and injured during a road check in the town of Stains northeast of Paris on Saturday, according to Paris police. The national police official said there was no immediate sign of any link between the Orly incident and the Stains shooting.

Passengers at Orly airport told of gunshots and panic.

A witness identified only as Dominque said on BFM television: "The soldiers took aim at the man, who in turn pointed the gun he had seized at the two soldiers."

Another man said on BFM that three soldiers were targeted, and they tried to calm the man who seized the weapon. Then the man said he heard two gunshots.

The soldier who was attacked is part of the Sentinelle special force installed around France to protect sensitive sites after a string of deadly Islamic extremist attacks. The force includes 7,500 soldiers, half deployed in the Paris region and half in the provinces.

Orly is Paris' second-biggest airport behind Charles de Gaulle, serving domestic and international flights, notably to destinations in Europe and Africa.

The shooting came after a similar incident last month at the Louvre Museum in which an Egyptian man attacked soldiers guarding the site and was shot and wounded.

Saturday's attack further rattled France, which remains under a state of emergency after attacks over the past two years that have killed 235 people.

—Reuters and The Associated Press contributed to this report.