Four Spanish men could face long prison sentences if convicted for pummelling a regional president with pies, in a case their lawyer has described as reminiscent of the Inquisition.

The men are due to appear in court in Madrid on Monday charged with "hurling said pie in the face of Yolanda Barcina Angulo in an energetic fashion", in protest at the development of a high-speed train network that threatens forest land in the Pyrenees.

Barcina, president of the north-eastern region of Navarre, was left "dazed and disorientated" and her clothes were damaged, according to court documents. The incident took place across the border in Toulouse, where Barcina, of the governing rightwing People's party, was taking part in a public meeting in October 2011.

The four accused – Gorka Ovejero Gamboa, Julio Martín Villanueva, Ibón García Garrido and Mikel Álvarez Forcada – are members of Mugitu, an environmental activist group dedicated to non-violent protest against the rail plans. Ovejero could be sentenced to up to nine years in prison and the other three could face six years.

Their defence lawyer, Gonzalo Boye, told the Guardian: "This case reveals the very worst side of the Spanish judicial system and its total lack of contact with reality. It shows a corrupt judicial and political class prepared to use public resources to try people that have done nothing more than demonstrate their opposition to the destruction of the forest.

"If these people are convicted, the court will look like a tribunal during the Inquisition rather than a modern court of law."

Boye said the court had rejected all the eyewitnesses called by the defence and accepted only the evidence of two local Spanish policemen who were not present during the incident.

The activists say they had no intention of causing physical injury and wanted only to highlight their cause and mock "the image of authority represented" by Barcina. Four other men involved in the stunt, all French nationals, face no charges in France or Spain.

Shortly after the incident, Barcina said she had been left feeling "humiliated". The Spanish prime minister, Mariano Rajoy, publicly expressed his support for her.

In an interview with the news site El Diario, Ovejero said he had not expected they would be risking a prison sentence when they planned the incident. He said they had looked into similar cases in other democratic countries, and could not find anyone who had been sent to prison for throwing a pie.

"In Belgium [the writer and activist] Nöel Godin and his group have thrown more than 100 pies in the face of important people and they have always been understood to be expressions of surrealist art," he said.

A number of recent trials have raised questions about the efficacy of the Spanish justice system, with many observers arguing there is one rule for the political and social elite and another for the rest.

Last week an 11-year investigation into the Prestige oil spill, in which 50,000 tonnes of crude oil destroyed fishing waters and beaches in Galicia, ended with no one found criminally responsible.

The ongoing trial of the People's party's former treasurer Luis Bárcenas has revealed the extraordinary levels of corruption at the heart of Spanish political and business life. Bárcenas is accused of handling an illegal slush fund made up of donations from construction companies, which was used to bribe MPs.

"In Spain, authority figures are protected as much, if not more, as they were under the dictatorship. If you throw a pie in the face of your local barber, nothing will happen. But if you do it to a public official, you'll find the great weight of the law coming down on top of you," Ovejero said.