Five Atlanta police officers are being hailed for their heroic act after they risked their lives to save two men trapped inside a burning car during the early hours of Wednesday.

The whole act was captured on the officers' body cameras.

According to reports, when the officers arrived at the scene, they saw the vehicle — with two men inside —"literally wrapped around the support pillar of I-85 on Cheshire Bridge Rd with the engine compartment on fire, quickly spreading to the rear of the vehicle."

Both the driver and the passenger were badly injured and in dire need of medical attention.

Due to their serious injuries, the occupants were unable to exit the car, according to a Facebook post of the City of Atlanta Police Department.

The officers who responded and carried out the rescue were Derek Daniel, Elijah McCall, Michal Skillman, Andre Valentine, and Bill Brooks.

"It's not always about catching bad guys," said officer McCall, according to Fox5 News. "We also go out and save lives."

The bodycam footage shows flames engulfing the hood of the car inside which the two occupants are trapped. After seeing the burning car, the officers rushed toward it and tried putting off the flames with the extinguishers from their patrol cars. 

They also tried pulling out the trapped men from inside the car, but could not do so as their legs were "engulfed by the vehicle’s dashboard as a result of the crash’s impact." 

Soon, Atlanta Fire Department personnel arrived at the scene and extinguished the fire; they also took out the men trapped inside the car.

Fire officials said if the officers hadn't reacted promptly to the situation, the men inside the car would have been burnt alive. The injured were rushed to a nearby hospital for treatment, according to the Facebook post.

The brave officers also described the moments they first saw the burning car.

"We were hearing the screams from the guys. I mean, to hear somebody scream and ask for help — you're trying to help them — but you really can't because they're pinned inside," officer Brooks told WSB-TV, an ABC-affiliate.

Regarding the two men who were trapped inside the burning car, officer Daniel said: "Our main goal at the time was to get those guys out. We weren't concerned about our safety at the time. It was for their safety."

Officer Valentine, who has been on the job for a year, said he would not mind rescuing somebody in a similar situation again. "I would hope that somebody would do that for my family as well," he said, according to the Atlanta Journal-Constitution.

"This was an extreme act of bravery, heroism, and excellent critical thinking displayed by these fine Atlanta Police Officers," the Facebook post said. 

The cause of the crash is yet to be figured out as police continue to investigate the matter, a report said.