WATCH: DHL cargo jet splits in two after fleeing in Costa Rica

A DHL cargo jet skidded off the runway and broke in half while landing at San Jose International Airport on Thursday, temporarily closing the airport but injuring the crew.

The fire department said the Boeing 757 had taken off from Juan Santamaria Airport, west of the capital, but decided to return after a hydraulic system malfunction was detected.

Hector Chaves, the director of the Costa Rica Fire Department, said the plane skidded, twisted and broke in two upon landing, leaving its cargo.

“Units were mobilized to remove the pilot and co-pilot,” Chaves said. “Then they applied foam to stop the spill and now they’re working on an earthen dam to keep any fuel from reaching the drainage system.”

A spokesman for cargo carrier DHL said both pilots were not harmed, but one was being medically tested as a precaution.

DHL spokesman Daniel McGrath said the company is working with airport officials to move the plane so flights can resume. He said an inquiry would be conducted to ascertain the cause of the incident.

DHL is a subsidiary of Deutsche Post DHL Group.

Luis Miranda, Costa Rica’s deputy director of civil aviation, said the plane was only 35 miles from the airport when it requested permission to fly to Guatemala City on its planned flight. He said only the pilot and co-pilot were the crew members in the plane, which was carrying only 2 hours of fuel.

Airport operator Eris said the airport on the outskirts of the capital San Jose reopened at 3.30 p.m. local time, several hours earlier than expected after the 10 a.m. incident, Reuters reported.