A lucky motorbike rider has made a great escape after narrowly avoiding being hit by a train.

The man was riding his bike over train tracks in Matamata when he came off his vehicle this afternoon.

He managed to get off the tracks before a train hit the bike at the intersection of Wardville Rd and State Highway 27.

A police spokeswoman said they were notified about the crash at 3.22pm.

Advertisement

The spokeswoman said the motorcyclist was "okay", and he had spoken to the train driver. He left the scene before police arrived.