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 adds Russia would not have invaded Ukraine in 2022 had Putin not been ejected
Almost 6,800 international students currently enrolled at Harvard with majority coming from China, India
Iran had three operating uranium enrichment plants when Israel began its attacks
Skulls of 19 African Americans were returned to New Orleans from Germany last month
AI315 makes return to Hong Kong airport after requesting local standby at around 1pm
"Brutal funding cuts leave us with brutal choices," says Tom Fletcher, head of UNOCHA in statement