I don't hugely agree with people saying that the police here have problems with English fans in particular. They just hate disruption of the peace in general. I've lived here long enough to know that when ever there is any risk of things getting out of hand, or when ever someone attempts to do something to the police such as throwing a can of beer at them... they just escalate. None of the soft hand policing, none of the messing around.
In addition I think it is almost general knowledge that the police in Spain don't f-ck around. You need only look at how they brutalised people during the austerity protests. Even old people who had nothing to do with it. Long story short, keep your distance and do as they say. Gtfo if you sense trouble coming. They have no interest in your banter, but will gladly give you their version of banter which comes in the form of smashing people with sticks.