Two Spanish trade unionists have been released after spending a night in jail over a Robin Hood-style raid on supermarkets.

They face prosecution for theft and pressing one store to donate food for distribution to the needy.

They were arrested after their union, which represents rural labourers in southern Spain, organised a raid to steal cartloads of food.

“Taking some food and giving it to families who are having a really hard time, if this is stealing, I am guilty,” said one of the men, Francisco Molero of the SAT union.

Hundreds of workers are said to have been involved in the raid, which was condemned by leaders of Spain’s largest unions.

An industry association said supermarkets already made donations. However, the unionists have local backing. A left-wing mayor, José Manuel Sanchez Gordillo, faces charges after leading the raid.

“If I end up in jail because I highlighted the crisis, it will be a honour,” he said.

The mayor spent a night in an improvised camp to show solidarity with other activists.

Andalucia has been particularly devastated by the crisis since the property crash of four years ago, with a third of the population out of work.