At least four people have been killed and around 30 injured in a train derailment in the southeastern state of Bavaria, the BBC reported, citing police.

The train, which was mostly students, was bound for Munich when three carriages derailed near Garmisch-Partenkirchen.

Investigators said they are working to determine the cause of the crash.

German Chancellor Olaf Scholz expressed condolences to the families of the victims.

The accident happened on Friday at about 13:15 local time, shortly after the train left Garmisch-Partenkirchen for Munich.

It is reported that 15 victims are in serious condition at a local hospital. Authorities also confirmed that several children were among the victims.

It is not yet clear what caused the accident, which occurred as the train was rounding a wide curve, but Bavarian transport minister Christian Bernreiter told regional broadcaster BR that the accident could have been the result of a technical malfunction.