A high-speed train passing through a Spanish railway station has hit a group of young people crossing the tracks, killing at least 12 people.
The train was travelling through Castelldefels Playa station near Barcelona when the incident occurred.
At least 14 other people were injured, three critically, officials said.
It is believed they were heading to the beach to celebrate a summer festival and were crossing the tracks rather than using a pedestrian underpass.
They had just arrived on a commuter train from Barcelona. The authorities have said the underpass was signposted and open. Some witnesses said it was crowded and taking a long time for people to get through.
One witness, Fernando Ortega, told Spanish media the platform they had arrived on was "very full" and a large group of people "decided to jump across the tracks and cross to the other side of the station" to avoid the crush.
"At that moment a train came from the other direction and ran everyone over."
Another witness, who was not named, said: "The door was closed and we could not get through, so we tried to go through the side of the train, and there was no light and nobody alerted us that the train was coming. We were more than 30 people."
Several people contacted the BBC News website to say that they had used the same station and it was common for people to cross the tracks.
Jordi Morell said: "The underpass is quite small and it has been the usual practice for crowded trains coming from Barcelona, to have at least a third of the passengers crossing the line.
"Even at my age (early 60s) I have got down from the platform and crossed the line rather than wait for the slow queue through the underpass."
Many of the victims were heading to the beach for the annual San Juan festivities, which celebrates one of the year's shortest nights with bonfires, fireworks and dancing.
Marcelo Cardona, a Bolivian who was on the commuter train, said the youths had crossed "in a wave" but that he had held back and waited on the platform.
"The euphoria of getting off the train immediately became screams. There were people screaming, 'my daughter, my sister'," he told the Associated Press.
Mr Cardona said he saw "mutilated people, blood everywhere, blood on the platform".
The owner of a nearby supermarket described the impact between the train and the pedestrians as "brutal".
"The noise was like rocks being crushed," he told El Mundo.
Spain's interior minister Alfredo Perez Rubalcaba said: "We're shocked. It's horrible. The only thing we can do at the moment is send a message of solidarity to the families of those who died and wish that those who are injured will recover as soon as possible."
The accident happened at around 2330 local time (2130 GMT), the interior ministry of Catalonia said.
The ministry added that the rail line was closed and teams of police, medical staff, firefighters and Red Cross workers were at the scene.
No-one on the high-speed train, travelling between Alicante and Barcelona, was hurt.
Although the identities of the victims are not yet known, the president of the government of Catalonia said there were "many of South American origin".
The accident was Spain's worst rail accident since 2003, when 19 people were killed when two trains collided near the central town of Chinchilla.