PRAGUE (AP) — Two planes carrying dozens of parachutists collided in midair Thursday over western Slovakia, killing seven people, officials said. Thirty-one others on board survived by jumping out with their parachutes.

The crash took place Thursday morning at 0720 GMT (2:20 a.m. EDT) near the village of Cerveny Kamen, said Zuzana Farkasova, a spokeswoman for the Slovak firefighters. Rescue workers used helicopters to reach the forested crash site in the White Carpathians mountain range that forms the border with the Czech Republic.

The two Czech-made L-410 transport planes collided at an altitude of 1,500 meters (4,921 feet), said Juraj Denes, an official with the Slovak Air and Naval Investigations Bureau, a government agency that investigates plane crashes.

Peter Bubla, spokesman for the Health Ministry, said 38 people were on board the two planes and 31 survived. Five people needed some medical treatment but nobody was hospitalized, he said.

Some on board jumped out even after the planes collided, according to Interior Minister Robert Kalinak.

"The 31 parachutists managed to jump out from the falling planes and survived," Kalinak told the TA3 news television station as he visited the crash site. "They all landed safely. It's a small miracle."

The dead included the two crew members from both planes and three parachutists, Juraj Gyenes, another official at the aviation investigations agency, told TA3.

TA3 reported the parachutists were training for this weekend's air show in nearby Slavnica.

"All of a sudden, I heard a big blow," one witness told TASR, the Slovak news agency, in a news video. "Then it roared. I thought some pieces were falling, but it could be the parachutists."

Kalinak and Slovak Health Minister Viliam Cislak visited the crash site, where wreckage from the planes smoldered among the dense mountain forest.