Armed police rushed to Swindon Village near Cheltenham, Gloucestershire, this afternoon after reports shots were fired at a freight train.
The driver's cab window was shattered by the impact but it is not yet known if he was injured.
Gloucestershire Police said in a statement: "We were called just after 4.45pm today by British Transport Police reporting that the driver’s window of a train had been ‘shot at’ and completely shattered near the bridge at the junction of Windyridge Road in Swindon Village in Cheltenham.
"We are trying to ascertain whether it was a weapon or another item such as a rock that caused the damage.
"Armed officers are attending the scene – this is as a precaution and is standard practice when there is a possibility a weapon has been used."
Passengers faced long delays as officers investigated.
One passenger on a train near Cheltenham told Gloucestershire Live: "I'm on a train which is stopped outside Cheltenham. It seems that all trains at the station have been stopped. It seems that a freight train driver was shot at."
A British Transport Police spokesman said: “We were called at 4.34pm to reports that a freight train was shot at between Cheltenham and Ashbury. Officers are on the scene and searching the area. Initial enquiries indicate the damage was caused by a pellet or slingshot.”