Two trains have collided head-on on a level crossing northwest of Copenhagen, leaving five people critically hurt and 13 others with less serious injuries, medical officials say.

The trains were traveling early on Thursday on a line linking the towns of Hillerød and Kagerup in the North Zealand area of north-east Denmark, with a total of 37 people on board, according to police.

Tim Ole Simonsen of the Greater Copenhagen fire department stated that all injured had been taken to hospital by air or by ambulance. He was unable to specify the cause of the crash.

Local mayor Trine Egetved expressed her shock at the accident, stating that the local track is widely used by residents, workers, and students.

Images showed the two yellow and grey trains, both visibly damaged, facing each other in a wooded area.

The collision occurred at 06:29 local time (05:29 BST) on Thursday, prompting an immediate alert to fire and rescue teams. Egetved confirmed that those with critical injuries were flown to the National Hospital in Copenhagen.

\u201cIt is shocking that two trains could collide head-on and we must ensure it never happens again,\u201d she added. Prime Minister Mette Frederiksen also expressed deep concern over the incident.

The Accident Investigation Board arrived on-site to determine the cause of the crash, with Inspector Morten Pedersen indicating that it was too early to establish what had gone wrong. The investigation will examine all possibilities, including signaling failures or human error.

Claus Pedersson, safety director at Lokaltog, described the situation as \u201con of the worst we can imagine in the railway industry\u201d, as authorities collect data to understand the causes of the incident.

Initial reports suggest that one of the train drivers may have pulled the brakes and assisted with evacuating passengers. Experts believe that one driver might have overridden a stop signal, leading to the devastating collision.

Denmark's rail accidents are quite rare, but they emphasize the necessity for robust safety systems as investigations continue into this tragic event.