A belt buckle shaped like a grenade caused train chaos in Barcelona and Madrid.

Police in Spain evacuated stations and halted services in the two cities on Wednesday after a suitcase with the grenade-like object passed through a scanner.

Authorities began searching high-speed trains and railway tracks when the alarm was raised.

The woman whose suitcase it was had passed through Barcelona's central Sants station, where a scanner identified a possible explosive.

The woman in question was not stopped.

Stations in Barcelona and Madrid were halted and services suspended. Credit: AP

Spain's National Police stood down the alert after agents in Madrid confirmed the suspicious object didn't pose any danger.

"Everything returns to normal," said the National Police in a brief tweet.

Police in the Catalonia region tweeted an image of the scanned suitcase, saying the object turned out to be a belt buckle.

Asked why the suspicious case was allowed on the train, the company that manages Spain's railway infrastructure and oversees train station security said that it had opened an internal investigation.

Long queues formed outside stations. Credit: AP