Three teens were seriously injured when their car collided with a tractor-trailer and burst into flames. (Prince George’s County Fire Department)

Three teenagers were seriously injured overnight when their car collided with a tractor-trailer and burst into flames, authorities in Prince George’s County said.

The fiery crash happened late Tuesday, shortly before midnight, in the 8400 block of Ardwick-Ardmore Road in Landover. The roadway was closed for more than six hours as crews worked to clean up charred debris and investigators tried to piece together what happened.

According to fire officials, the sedan carrying the three teenagers collided with the rig, which was carrying materials used to manufacture mattresses, and became wedged underneath it.

The teens, whose exact ages have not been released, were seriously injured in the crash but escaped from the wreckage moments before the vehicles burst into flames, officials said.

The driver of the tractor-trailer, who was not injured in the collision, also escaped before the vehicles became engulfed in the fire.

Officials said that two of the teens were transported to a local trauma center and the third was taken by helicopter to a trauma center in Baltimore. No details on their injuries was released.

It took firefighters about 20 minutes to knock down the vehicle fire. The investigation and clean-up continued through the early morning.

Ardwick-Ardmore Road was shut down between Route 50 and Martin Luther King Jr. Highway until around 6:30 a.m.

The cause of the crash remains under investigation.