There were the 'Indians' and the 'smugglers'. The 'Indians' were those who tried to emigrate and the 'smugglers' the Portuguese or Spanish locals who helped them across the border, in return for a fee.
When someone was caught he had committed the crime of illegal immigration. In the photograph we see a group of emigrants, from Soito who wished to emigrate to France in the early '60s.
Persecuted by the Guardia Civil in Spain, arrested and taken to prison, where a police officer took this picture (later offered to one of the emigrants).
Those with the beret are the 'smugglers', Spanish, in this case. The rest are all from Soito.
This time their attempts failed. All of them tried again and succeeded.