Police evacuated the main railway stations in Barcelona and Madrid during Wednesday morning’s rush hour after a belt buckle in the shape of a hand grenade triggered a security alert.

The incident, which turned out to be a false alarm, appears to have been caused by a woman carrying the belt buckle on to a train from Barcelona to Madrid.

The Catalan regional police force, the Mossos d’Esquadra, said an explosives unit was dispatched to the high-speed rail tracks at the central Sants station in Barcelona at 8am following a call from railway workers.

The alarm was triggered after security officers saw an object “with the shape of a possible explosive device” on their scanners.

A photograph released by the force appeared to show the outline of a hand grenade in a suitcase. A police spokesperson said the object was a grenade-shaped belt buckle.

Two trains were searched before the Mossos declared that the object “posed no threat”.

The security alert also led to the evacuation of Madrid’s Atocha station, but police said this was a false alarm.

“Our officers have carried out the appropriate checks at Madrid’s Atocha station and found it was a false alarm,” Spain’s national police said in a tweet. “The police operation is over and everything is back to normal.”