A mother and her three daughters were stabbed while on holiday in the south of France because their attacker was furious the father had scratched his crotch, a court has heard.

Mohammed Boufarkouch is accused of attacking the family as they ate breakfast in the village of Garda-Colombe in the Hautes Alpes near Montpellier on Tuesday (19 July).

The youngest victim, aged just eight, was airlifted to Grenoble hospital for an emergency operation after suffering a punctured lung. The other two daughters, aged 12 and 14, were taken to a hospital in the nearby town of Gap with their 46-year-old mother, who was treated for a stab wound to the chest.

Boufarkouch, who was arrested after trying to flee in his car, has now been charged with attempted murder.

The 37-year-old appeared in court in Grenoble where local prosecutor Raphael Balland said the attack appeared to have been sparked by the father scratching his crotch.

"The husband, and father, of the victims, confirms he crossed the suspect while he was leaving the premises after the attack," he is reported as saying in MetroNews. "The suspect allegedly then told him: 'You shouldn't have done that in front of my wife,' then scratched the inside of his thigh over his shorts."

The prosecutor added: "The husband doesn't remember doing such a gesture."

Balland said it was "hard to comprehend that such a gesture could have sparked such a serious attack from a person in full mental health or devoid of any ideological intent".

It emerged the victims, identified only as being from Nantes in north west France, had met the attacker with his wife and two children while staying in the neighbouring apartment of a holiday centre.

The assailant allegedly first launched into a frenzied attack on the daughters at about 9.40am, before going on to stab their mother. Police said a folding knife with a blade measuring from 8 to 10cm was later found at the scene.

After being detained by police, it was revealed the Moroccan-born man said 'Allahu Akbar', meaning God is Great in Arabic, three times while being questioned. It led to suggestions in the local media the incident may have been an Islamist terror attack.

But his defence lawyer, Jean-Francois Philip, told Le Dauphine his client had yelled the phrase because he felt oppressed during interrogation. Investigators also said there was no evidence of radicalisation with the suspect said to have "little interest in religion".

Boufarkouch, who lives in Yvelines near Paris having moved to France in 2007, also told his lawyer the attack was not motivated by the girls and mother being "scantily dressed".

Reports in the local media, along with claims made by Jean-Marc Duprat, the deputy mayor of the nearby town of Laragne-Monteglin, said the attacker had been upset about the mother and girls being "too lightly dressed". But Philip and Balland both dismissed the reports as false.

Philip said his client had instead complained of suffering depression and schizophrenia, claiming he had stopped taking medication six months ago.

"He expresses regret but did not explain his actions. He says it is a moment of madness," he said. While a psychiatric examination found no evidence of mental illness, Philip said a full analysis should be ordered by the judge.

Boufarkouch denies any criminal intent and has been remanded in custody. The victims are recovering from their injuries, which are not thought to be life-threatening.