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.
Trump urged lawmakers to tie up loose ends before he takes office, but Republicans refused to support package
Some members of Congress suggest that Elon Musk should take over as House speaker
Chen Jinping and Lu Jianwang opened outpost in Manhattan's Chinatown in early 2022, say prosecutors
Vladimir Putin says Russia ready for "negotiations and compromises"
Egyptian Ministry of Tourism and Antiquities says human remains date to Ptolemaic period
"They would save massively on taxes, military protection. I think it is a great idea. 51st State!!!", writes Trump