The violent clashes in Berkeley have presented a dilemma for the police, who say intervening has its own risks. Anarchist groups have for years appeared at protests in neighboring Oakland, punctuating peaceful demonstrations by smashing shop windows and attacking public buildings.