A train has derailed in southern Germany, killing four people and leaving 30 injured, police have said. The train had just left the ski resort town of Garmisch-Partenkirchen for Munich, when the accident took place near the Burgrain district of the town, just past midday on Friday. Four people died in the crash, 15 were severely injured, while another 15 sustained less serious injuries, said a police spokesman, updating an earlier count. Police said the train was “very crowded” at the time of the crash. Several carriages were lying on their side and a major emergency services operation is under way, officers said. Part of the line between Munich and Garmisch-Partenkirchen has been blocked off and traffic diverted, German rail operator Deutsche Bahn said. “In the serious train accident, as of 3:32pm, four people were fatally injured,” police said. “Around 30 passengers were injured, 15 of them so seriously that they have had to be admitted to nearby hospitals.” Stefan Sonntag of Upper Bavaria police said the regional train was “very crowded and many people were using it, hence the high number of injured”. School holidays started on Saturday in the southern German regions Baden-Wuerttemberg and Bavaria, raising fears children may count among the train passengers. Mr Sonntag said he did not have information on this. Garmisch-Partenkirchen and its surrounding regions are gearing up to host the G7 summit of world leaders later this month. From June 26 to June 28, heads of state and government — including US President Joe Biden — are due to meet at Schloss Elmau, about 11 kilometres from Garmisch-Partenkirchen. Police and soldiers on security duty at the G7 site were deployed to help in the rescue operation. Three helicopters from Austria's nearby Tyrol region were scrambled to the scene to provide first aid, according to media reports. Germany's deadliest rail accident happened in 1998, when a high-speed train operated by Deutsche Bahn derailed in Eschede, in Lower Saxony, killing 101 people. The most recent fatal crash took place in February, when one person was killed and 14 injured in a collision between two local trains near Munich.