A taxi driver apparently figured he could beat a train on Quigley Road early Saturday morning.

The cabbie guessed wrong.

Just after 3 a.m. the taxi approached a railway crossing southbound on Quigley Road.

Police say lights and bells were activated as a train approached, but there is no barrier arm at the crossing.

The cabbie drove over the tracks and was hit by the train on the passenger side of the car.

While the car was wrecked, the train was moving slowly enough that the driver and the lone passenger were able to exit the car under their own power.

The passenger, who had sat in the backseat, suffered minor injuries and was treated and released from hospital. The driver was uninjured.

A police investigation is underway that will determine whether charges will be laid against the taxi driver.

"It's safe to assume the train is not at fault here," said a Hamilton Police officer.