Supt Mark Sellers praised the swift action of police officers sent to the incident at Melksham railway station at 2.45pm today.
“These officers acted swiftly and bravely, putting themselves in potential danger to protect the public," said Supt Sellers.
“Thankfully nobody was injured and this incident was resolved safely – but we know it could have been a very different story.
“I would also like to commend the members of the public who called us, providing us with a detailed description of the suspect, while keeping themselves and others safe.”
A 44-year-old man from Devizes has been arrested on suspicion of affray and possession of a knife.
Any witnesses to the incident are asked to contact British Transport Police by texting 61016 or calling 0800 405040.