Police officers in Texas were hailed as heroes after, authorities say, they pulled an unconscious man from a car that crashed into a pole and caught fire over the weekend.

Footage from the officers’ dashcam and bodycam shows flames erupting from the engine compartment of the vehicle, after an accident that the White Settlement Police Department said took place around 2:40 a.m. Saturday along South Cherry Lane near I-30.

Responding officers learned that there were two occupants inside the vehicle when the car struck the utility pole. The driver was able to escape, though the male passenger in the front seat remained unconscious inside the burning car. 

Officers raced to pull the man out of the car and carry him to safety away from the growing fire.

BODYCAM FOOTAGE SHOWS GEORGIA DEPUTY RESCUE DRIVER TRAPPED IN BURNING VEHICLE

man pulled from burning car

Officers responded to a call of an unconscious man inside a burning car on Saturday in White Settlement, Texas. (White Settlement Police Department)

"I want to highlight the heroic actions by the brave police officers who serve our community," said Chief of Police Christopher Cook. "As you can see from the video, had it not been for the quick and decisive actions by police, this crash could have had a very different outcome."

TEXAS DAD SMASHES WINDSHIELD TO RESCUE CRYING BABY FROM CAR IN THE SEARING SUMMER HEAT

car on fire

Police pulled the unconscious man to safety as the fire began to grow in the car's engine compartment. (White Settlement Police Department)

Both the driver and passenger were treated at a local hospital and were expected to survive.

car on fire in Texas

The man was a passenger inside the car. The driver had escaped safely before officers arrived. (White Settlement Police Department)

CLICK TO GET THE FOX NEWS APP

While the cause of the crash remains under investigation, authorities said officers have not ruled out speed being a factor that led to the driver losing control of the car and crashing.