MADRID — A hand grenade-shaped belt buckle in the suitcase of a train passenger triggered major disruptions Wednesday on rail services in Spain's two main cities, prompting station evacuations before police declared the incident a false alarm.

An official with Spain's National Police said the alert was ended after agents in Madrid confirmed that the suspicious object in the suitcase of a female passenger who had traveled on a high-speed train from Barcelona didn't pose any danger.

The official was not authorized to be named in media reports.

"Everything returns to normal," said the National Police in a brief tweet explaining that disruptions in the long-distance and commuter train stations in the Spanish capital had been due to the false alarm.

The search in the capital followed police searching high-speed trains and railway tracks in the country's second largest city, Barcelona, after the central Sants station's security scanner identified an object shaped like a possible explosive device inside a suitcase.

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. The company, ADIF, also said in an email statement it was revising its security protocols.

An AP reporter at the scene in Barcelona saw long queues of passengers waiting for rail traffic to resume.

A homegrown extremist cell killed 16 people in August last year in Barcelona and a nearby coastal resort in consecutive vehicle and knife attacks that were later claimed by the Islamic State group.