Police in New Jersey rescued a man from a burning car just in the nick of time ... and it's all on video.

Dashcam footage shows cops in South Brunswick responding to a 911 call for a car crash, and they pull up to find a car that had gone off the road and crashed into a tree.

The car starts smoking and flames begin to rise from under the car ... and officers use a baton to smash the driver's side windows, pulling the driver from the wreckage moments before the car is engulfed in flames.

The hero cops here are Yash Shroff and Thomas Sites ... and it looks like the driver, Safwan Islam , owes them his life. He reportedly suffered a medical episode while driving, resulting in the Nov. 9 crash.

Cops say the driver had an iPhone that detected the crash and automatically called 911. Th

See Full Page