At English common law someone can choose to resist an unlawful arrest and can do so using reasonable force to try to prevent the arrest. In reality it's likely that the police will have sufficient physical force to overcome the resistance of the individual and take them away. In that case the individual has recourse to sue in an action for tortious liability and to have damages awarded. While it's legal it's not advisable. You can get hurt for one. I don't know the legal situation in Sweden. However I think it might be similar and in any case don't (*)(*)(*)(*) with the cops is a good idea, go and see a lawyer later to sort it out.
Thou shalt not follow a multitude to do evil Exodus 23:2