I don't like encouraging violence, but it really works in situations like this. Usually the idea is to work in defense or to show resilience, its a cliche but people won't try to start crap with you if your reaction is a potential risk to them.
When I was 9 there were these two douche bags following my friend and I outside of school hours and harassing us while we tried to bike to local shops in our area. They were fellow students of our class and during the year would sometimes tease us, or try to get in the way of what we were doing.
40 minutes later and still being perpetually followed, while one of the guys was laughing about arms reach away from me, I walloped him in the side of the face with my fist. It wasn't a punch, it was a sort of awkward sideways strike. It was very out of character for me, I just remember the great look of shock on his face...
... then he hit me harder in a similar sort of fist-bitch slap style about 3 times, along with verbal abuse. What can I say, it hurt.
It is the only time in my life someone has intentionally been aggressively violent towards me, and to be fair, it was my fault (provoked or not).
They followed for a few minutes after that, then disappeared. After that, they never spoke to me or my friend in a derogatory way. I rarely came into contact with them, and when I did, there was a bizarre feeling of respect for each other. Dunno if thats the result of some stupid male social hierarchy but whatever, it worked.
Funny stuffz.