Brazil government has never been known as one of the most diplomatic governments in the world, but it still manages to amaze me. First, it was with Americans - which now choose to visit other South American countries like Chile or Argentina, where visa or fingerprinting are not required. Now with Europeans, mostly Spanish people. When is that going to end?
All the facts make me believe that the Spanish government has been rude and using inappropriate criteria when denying entrance of people that are there to catch a connection flight to other places or even those that are simply going to visit Spain and Europe. However, acting by the same standards is something that is completely stupid to me, because it does not help and, worse, it harms Brazil's image and its turism.
Illegal immigration is something that must be fought and people arrested in this situation must pay for their crime (yes, it is a crime) and get deported. No excuses, no privileges. It is inconceivable that any country accept illegal immigrants and make their taxpayers to pay for people that were not allowed to live in the country. That happens with some poor countries, like I just read today about Bolivians trying to immigrate illegaly to Brazil, but the vast majority of the destinations are richer countries, like North America or Europe. I can't think of people from these countries planning to immigrate illegaly to Brazil. It does not make any sense, while the contrary does.
Spain is totally right to protect itself against illegal immigration, it is right to protect their borders, but it is wrong to have different criteria depending on the nationality. Why would someone with an US passport or even European passport have different treatment by immigration offices? Definitely they are way more unlikely to be in the group of people that would immigrate illegaly, but also part of this group are lots of Brazilian and people from all over the world, no matter where they are from. And judging all by the behavior of some is wrong.
Anyway, although I expect some improvement, it is hard to believe that people won't have some preconceived ideas whenever someone from South America shows up his/her passport to immigration officers from richer countries. Unfortunately it is very natural to be associated with the society where you come from. Everybody does that to some extent, consciously or not, that is why racism still exists and may take a while to be extinguished - if it will be ever extinguished.
If you also take into account the political scenario in Latin America, with the conflicts between Colombia and Ecuador and relationship with Venezuela and Cuba, one can see how amateur politicians can be.
The interesting phrase above I read in a post of a Catalan defending Spain regarding this issue. And he mentions the problem with illegal immigration as being the justification for this behavior.