Three people were killed and 30 injured when a double-decker bus rammed a train at railway crossing in Thailand's Nakhon Pathom province.

The accident happened on Sunday when the bus carrying factory workers tried to cross the railway line without noticing a passenger train rushing in at high speed.

While the bus driver was killed on the spot two others died in a hospital. There was no red signal at the crossing and the gates were open but video footage clearly showed the train was approaching, local media reported.

A new automatic safety barrier installed at the crossing had not beam functional yet, officials said.

Thai police said on Monday they were investigating if alcohol or drugs were involved in the accident. Loud music in the coach could have been another reason why the driver did not notice the oncoming train, the police said, according to Bangkok Post.

Authorities have collected blood samples of the bus driver to determine if he had consumed alcohol or substance.