At four in the morning in lower Manhattan, as what remains of the Occupy Wall Street encampment is loaded into trash compacters, some protesters have still not given up on the police. Kevin Sheneberger tries to engage one NYPD officer in a serious debate about the role of law enforcement in public protest. Then he sees them loading his friend's tent into the back of a rubbish truck. Behind him, a teenage girl holds a hastily written sign saying: "NYPD, we trusted you – you were supposed to protect us!"

The sentiment is a familiar one. Across Europe, over a year of demonstrations, occupations and civil disobedience, anti-austerity protesters have largely shifted from declaring solidarity with the police – as fellow workers whose jobs and pensions are also under threat – to outrage and anger at state violence against unarmed protesters. Following last month's police brutality in Oakland, and today's summary eviction of the Occupy Wall Street camp, American activists too are reaching the conclusion that "police protect the 1%".

The notion that law enforcement is there to protect a wealthy elite from the rest of the population is not news to those protesters from deprived and ethnic minority backgrounds, many of whom have been subject to intimidation in their communities for years, but for those from more privileged backgrounds, the first spurt of pepper spray to the face is an important education in the nature of the relationship between state and citizen in the west. "Who do you guys work for?" Shouts one Manhattan protester, as police load arrestees into a van. "You work for JP Morgan Bank!"

In times of economic and democratic crisis, it makes sense for faltering governments to use police violence and the threat of arrest to bully citizens into compliance. In the context of protest, however, police harassment has three other, important effects. The first and most important of these is consciousness-raising.

The spectacle of police beating and brutalising unarmed civilians for the crime of sitting on the pavement and demanding a fairer world brings home the point of the struggle to public and protesters alike. The second is galvanising: attacks on peaceful protesters rarely make the police or government look anything but weak and cowardly, and have tended only to increase public support for civil disobedience. "This is going to explode now," 26-year-old Katie tells me, as we watch demonstrators marched out of Zuccotti Park one by one. "They don't realise what they've done."

Fighting the police can focus the energy of a movement – but it can also drain that energy. In Britain, a year of arrests and vicious crackdowns have left anti-cuts protesters debilitated and depleted, and the challenge for the American movement will be to remember its purpose in the face of police brutality. "That's the whole point of violent resistance," says Sheneberger. "It exposes the corruption of the power that's resisting you."