A Michigan police officer risked his life to pull a teenager from a car that burst into flames early Sunday after the driver crashed into the woods in a dramatic incident captured on dashcam video.

The Oakland County Sheriff's Office said the crash happened around 2:30 a.m. north of Pontiac, after the driver flew past the deputy at speeds that exceeded 100 mph.

The deputy tried to chase the driver, but couldn't catch up. The driver ended up crashing into a group of trees before the car then erupted into flames.

In dashcam video, the deputy is then seeing running over to the inferno, then breaking the sunroof of the car to pull the 18-year-old driver from the burning vehicle.

"This is a reminder of the types of incidents our deputies can encounter each and every day," Sheriff Michael J. Bouchard said in a statement to FOX2 Detroit. "While our deputy had been in pursuit of this speeding suspect, it was their first instinct to risk their own lives to save his individual from a burning vehicle. If not for the quick action of our deputies, this individual may have not survived this incident."

MARYLAND POLICE OFFICER, 3 OTHERS FALL THROUGH ICE ON LAKE BEFORE DRAMATIC RESCUE

The teen driver, who was not identified by police, smelled of alcohol and marijuana when he was pulled from the vehicle. He was later taken to a hospital for treatment from a broken femur and other lacerations sustained in the crash.

Police told FOX2 the teenager has since been released from custody, pending further investigation and blood results.