Police in Texas released a dramatic video showing officers banding together to rescue a trapped driver before his car became engulfed in flames.

The 20-year-old man’s foot became stuck in his mangled vehicle after he fell asleep behind the wheel on the morning of Dec. 8 and crashed into a tree in Houston, the Harris County Constable’s Office said.

“We might have to break your leg bro, I’m sorry,” an officer is heard telling the driver as others are using extinguishers to stop a raging fire from consuming the vehicle.

“No, no no no no. You can’t pull it back?” the panicked driver responds.

OHIO POLICE RESCUE 13-YEAR-OLD BOY FROM FREEZING LAKE ERIE

An officer is seen trying to free it – to little avail -- with the help of a pry bar.

“My leg! My leg!” the man is heard screaming in pain at one point in the footage.

He eventually is freed as the blaze enters the area of the driver’s seat.

“We got him out just in time. So what happened was, his pants were stuck, I cut his pants and that’s what freed his leg out,” an officer says in the video as the sounds of an ambulance can be heard in the background.

The Constable’s Office says the man suffered several broken bones and is currently recovering from surgery at a local hospital. A few deputies, it added, suffered superficial burns and singed hair.

CLICK HERE TO GET THE FOX NEWS APP

“These deputies showed incredible courage as they worked together to save this man’s life,” Constable Ted Heap said. “You never know, until you find yourself in a situation like this, how you’ll react. The way they responded under extremely stressful and dangerous conditions makes me proud to wear the same Precinct 5 badge.”

At the end of the video, an officer says to the man: “You are serving a purpose on this land dude, God was with you tonight, you understand that?”

“Yes,” he replies.