Emergency services in Spanish Catalonia wrote on X — formerly known as Twitter — that at least people have lost their lives and another three were injured after a group of seven people were hit by a train while crossing the railway line.
The incident took place in Montmelo about 20 kilometres (12 miles) north of Barcelona.
Spanish media said a music festival was held nearby on Sunday night, the eve of a holiday in Catalonia.
The regional firefighting force wrote on X: "We searched for other possible victims near the train. We did not find any others. We also helped evacuate the area and take the injured to ambulances."
Transport Minister Raquel Sanchez offered her condolences to the families of the victims and expressed her support on social media for the emergency services workers dealing "with this very difficult situation."
The head of the regional government of Catalonia, Pere Aragones, said he was "completely distraught" by the tragedy.
"Emergency services are continuing to work and offering support to the victims and their families. police are investigating the causes of the accident," he added.
In June 2010 an express train struck a group of people who were crossing the railway in the beach resort of Castelldefels, killing 12 people, according to AFP.
The people crossing the line on that occasion had just got off a commuter train and were crossing the track to get to the beach where a concert was being held to celebrate the summer solstice.
Some people complained at the time that an underpass exit was poorly marked and an old crossing was blocked off, leaving travellers confused.
Hisham Awartani, Tahseen Ahmed, and Kinnan Abdalhamid were shot close to the University of Vermont campus in the US
"I only wanted answers as to why India is using violence to stop Khalistan Referendum," says Sikh leader
Trump upstaged Nikki Haley on her home pitch as he watched Clemson Tigers face-off South Carolina Gamecocks
Protesters are marching around Europe and the Americas on the UN-designated International Day for the Elimination of...
8.1 million birds have been slaughtered this year in the US over fears of diseases
Replacing Flintoff would make new host look "heartless", says Clarkson