“If we have to break the law to help people, let’s do it!” he told supporters outside the Nice court on Wednesday, where a crowd of about 300 people gathered.

“Our role is to help people overcome danger, and the danger is this border,” he said, accusing French police of detaining “thousands” of minors and dumping them back across the border.

In October, Herrou led a group of activists who occupied a disused holiday village belonging to the SNCF state railway company and opened it up to a group of migrants.

Police intervened after three days to evacuate the makeshift camp and arrested Herrou.

Two months earlier, he was arrested for trying to smuggle eight Eritrean migrants by car from Italy into France. That case was later dropped, with prosecutors accepting that he acted on humanitarian grounds.

However, he is now accused of being more activist than good samaritan.

Herrou is part of a network of citizens and activists who have resorted to semi-clandestine tactics in assisting migrants who are regularly removed by the police from trains crossing into France and sent back to Italy.

Outlaws for some, they have been likened by others to the French people who helped hide Jews during the second world war.

A university researcher was also prosecuted in October after being caught giving a lift to three Eritrean women near Nice, shortly after their arrival from Italy.

The ruling in the researcher’s case is expected on Friday. Prosecutors have called for a six-month suspended sentence.

In December, a 73-year-old academic was fined €1,500 for a similar infringement.