A car slammed into a wall and burst into flames in Southern California, leading to a dramatic rescue caught on video.

The short video shows what happened after the 2003 Mercedes crashed in Palmdale early Thursday, trapping the unconscious driver in the wreckage, Fox 11 Los Angeles reported Friday.

Three Los Angeles County sheriff's deputies and a bystander braved thick smoke and flames to drag the 28-year-old driver from the car, the station reported.

The videos showed the rescuers smashing open the car windows after they couldn’t force open the driver’s door, which was jammed, the station reported.

“Finally, two of the deputies began pulling the driver out through the broken driver-side window, while the third deputy got into the car to free the man's legs,” Lt. Brian Dunn told the station. “And they did all this while the car was burning.”

The injured man was in serious but stable condition at a hospital, Fox 11 reported.

His passenger, a 36-year-old man suffered minor injuries. He was refusing to help deputies investigating the cause of the crash, according to the station.

Click here to read more from Fox 11 Los Angeles.