One person has died and 44 have been injured after a commuter train came off the tracks outside Barcelona.

The six-carriage train, which was carrying 131 passengers, derailed on Tuesday at 6.15am between the Catalan towns of Terrassa and Manresa due to a landslide, according to the train operator Adif.

The Catalan civil protection agency said one person had died, three others were injured and 41 sustained light wounds. Eighty-six passengers were unharmed.

Eleven ambulances were dispatched to the site alongside firefighters, who worked to free passengers from the wreckage.

Eleven people were taken to hospital, while police set up an emergency facility at a nearby sports centre where psychologists were offering counselling. Relatives of those on the train were being helped at Barcelona Sants, the city’s main railway station.

The civil protection agency said it had been alerted to the accident by emergency phone calls from passengers, telling them there had been a crash and the train had stopped in the dark.

“We deeply regret this morning’s accident in Catalonia and are offering our assistance to the victims,” Adif said. “We have opened an investigation to determine the exact causes of the incident.”

The scene of the incident near Vacarisses, 28 miles (45km) north-west of Barcelona. Photograph: AP

Heavy rain over the past few days in the north of Spain has caused flooding and landslides.

A woman died on Sunday after a river flooded in the north-western Galicia region. On Monday, huge waves swept away the balconies of a seaside apartment building in Tenerife.

In 2013, 79 people were killed and about 140 injured when a train travelling from Madrid to north-west Spain came off the tracks. It was the country’s worst rail accident for decades.