He looked like an easy target: a medical student sitting alone on a late-night train.

The three men sidled up to the German student and told him to hand over his wallet. When he refused, they followed him off the train, trailing him as he walked past the hotel and pizza joint on Bringelly Road, Kingswood, in Sydney's west.

When the student, who has asked not to be identified, turned down a dimly lit alley his pursuers thought their moment had come.

It had, but not in quite the way they expected.