Quick-thinking officers helped pull a man who was trapped in a car that was on fire – and a police body camera captured the moments after the life-saving rescue.

Officers with the Rochester Police Department noticed a car had crashed into the Cassidy Mechanical building on Marion Road around 10 p.m. Thursday, ABC 6 reports.

The driver was incapacitated due to head injuries, the news station says, and the car was quickly filling with smoke because the car's engine was on fire, KIMT adds.

Officer Hawat Lou, who noticed the crash, broke the car's window with his baton to let out some of the smoke, then he and another officer pulled the unconscious man out of the car and to safety, KIMT notes.

Video from a police body camera show the next few moments:

https://www.facebook.com/kaaltv/videos/vb.162903613761776/1056956034356525/?type=2

Flames from the fire were nearly 10 feet high and a live electric current was running to the car, KTTC reports. The man had crashed into the building's main electrical meter connection, the news station says, but firefighters were able to put out the fire rather quickly despite the live wires, a post on the Rochester Fire Department's Facebook page says.

The fire department commended the officers, saying in the Facebook post: "The Rochester Police Department was Johnny-on-the-spot and likely saved a man's life. Way to go to our brothers in blue."

The driver, who admitted he had been drinking, had reportedly cut off another car before crashing into the building, reports note. The crash and fire are under investigation.

Last summer, the City of Rochester purchased 100 body cameras for police officers in the city, and some officers began wearing them in November, the Rochester Post Bulletin reported.