Two armed men attacked a van carrying a prisoner on his way to a French court on Monday, firing at the vehicle and striking a guard before making their getaway in the southern town of Tarascon, officials said.

The escape follows last year’s dramatic helicopter jailbreak by Rédoine Faïd, a notorious gangster, which led to calls for prison services to improve their security and intelligence gathering.

Monday’s raid took place around 8.30am, as dawn was breaking, just outside the courthouse where 27-year-old Lotfi Boussouak was due to be brought before a judge.

The prisoner, who had been detained since September 2017, faced charges of armed robbery, said prison officials.

Two heavily armed men, who had been lying in wait, “fired on the vehicle when it tried to get away with the prisoner”, the local prosecutor Patrick Desjardins said. He had earlier suggested three gunmen had been involved in the snatch.

Several bullet holes were found in the van, including in the front windscreen, and at least 11 cartridge cases were recovered from the scene, including some from an automatic rifle, he added.

The three guards escorting Boussouak from a jail in Béziers 90 miles (150km) away, two men and a woman, were “very shaken” by the incident, but none of them were hit by the gunfire, the prosecutor said.

“The first officer to exit the vehicle … to ring the [courthouse] intercom was struck with a rifle butt,” Desjardins said. Another guard was hit by flying glass.

Quick Guide France's most daring prison escapes using helicopters Show There have been 15 prison escapes by helicopter in France in the past 37 years. Here are some of the most daring. March 2003 Heavily armed gangsters used machineguns and anti-tank missiles to blast their way into the Fresnes high-security jail outside Paris and free a notorious gangster. The French authorities said they were being confronted with 'weapons of war' and had to rethink prison security. Pascal Payet: 2001, 2003 and 2007 Payet used a helicopter three times for prison escapes. In 2001, he escaped jail by helicopter and two years later helped inmates from the same prison escape using the same method. In 2007, Payet made a second daring escape from Grasse prison in the south of France, with the help of four accomplices and a hijacked helicopter and hostage pilot. At the time Payet was being moved to a new prison every three months in an attempt to foil his escape plans. 1986 The wife of Michel Vaujour, facing a long sentence for attempted murder and armed robbery, took helicopter flying lessons in order to whisk him away from prison. Vaujour reportedly painted nectarines to look like grenades to force his way on to the prison roof. 1981 Gangsters posing as businessmen rented a helicopter, took the pilot, his wife and children hostage and forced him to pick up two prisoners from the high-security Fleury-Mérogis prison outside Paris.

The gang and the prisoner escaped on foot, he added.

Desjardins said Boussouak had 14 previous convictions, but he had not been identified as needing special supervision, even though he was linked “to the higher spectrum of crime”.

However, Karim Terki, a prison guard union representative, said Boussouak had already attempted to break out of jail.

The authorities were “really naive; he played nice for several months in order to try to escape again”, Terki added.

The last dramatic jailbreak in France took place in late December when an inmate of the Fresnes prison, south of Paris, managed to escape from an exercise yard by climbing over a wall with a rope made of bedsheets.

Guards in the watchtowers fired three shots but the prisoner got away.

In July 2018, Faïd, serving a 25-year prison sentence for a series of crimes, was broken out of jail by helicopter. Two heavily armed accomplices hijacked the aircraft and used smoke bombs to whisk him away from the prison in Réau, 25 miles south-east of Paris.

Faïd, a career criminal with multiple convictions for armed robbery, was caught after three months on the run.