A French court acquitted former Ferrari driver Jean Alesi on Thursday of charges relating to an "idiotic" firework prank that backfired badly on his brother-in-law.

Alesi, 58, and his son Guiliano, 23, were in the dock in Nimes magistrates court after blowing up his brother-in-law's window with a firecracker, in what the ex Formula One driver has called a "bad joke".

The Alesis were let off a charge of "damaging the property of others by a means dangerous to people, committed in the context of a family conflict".

The incident in question took place on December 19 2021 in Villeneuve-les-Avignon in the southern Gard region where Alesi has a house.

The police received a tip-off around 10pm local time from residents concerned after hearing an explosion.

A neighbour spotted a vehicle leaving the scene with its lights off. That vehicle was traced to Alesi's brother Jose who was arrested.

Jean Alesi went to the police station the following day to clear his brother, explaining that he had been the one in the car with his son and a friend.

Alesi said he had stuck a "large firework bought in Italy" into the frame of a window of his brother-in-law's architect's office "without imagining causing such damage", the deputy prosecutor Antoine Wolff said at the time.

Alesi, who scored one victory in his 13-year career in F1, explained that he only wanted to play a "bad joke" on his brother-in-law.

The brother-in-law, who said he had "no problem" with Alesi, nonetheless filed a complaint for the damage to the windowframe.

Alesi told Thursday's hearing he took full responsibility for the incident.

"I apologise because I've never had such an embarrassing situation in my life. It was idiotic."

He added: "I was totally stunned by the power of the explosion. The intention was to have a laugh."

Alesi's lawyer Thibaut de Montbrial said there was a family tradition to set off fireworks in times of happiness in the Alesi family.

"And Jean Alesi was over the moon that night to be reunited with his son after months of separation due to Covid," de Montbrial explained.

The public prosecutor accepted that it was a "bad prank" and noted that Alesi had paid damages to his brother-in-law.

In its ruling acquitting Alesi and his son the court noted the absence of any "element of intent" behind the incident.

Alesi drove for Ferrari between 1991-1995, winning the only Grand Prix of his career for the Scuderia in Canada.