Updated

Newly released dashcam video from a police cruiser shows the moment a traffic stop turned into a near-deadly shootout between a man pulled over for speeding and two Pennsylvania state troopers last fall.

The Northampton County District Attorney's Office released the video of the Nov. 7, 2017 shooting on Thursday to media organizations six weeks after using it in the case against the driver, 22-year-old Daniel Clary.

In the video, state troopers Ryan Seiple and Seth Kelly can be seen trying to arrest Clary for driving under the influence in Nazareth, just outside of Allentown.

PA Gun Battle 1

Daniel Clary can be seen opening fire on two Pennsylvania state police troopers on Nov. 7, 2017. (Handout)

Police fired a Taser on him after he resisted arrest. Then, Clary broke away from the officers and grabbed a gun from his vehicle.

PA Gun Battle 2

Officers had used a Taser against Clary, but he continued to resist. (Handout)

The 22-year-old can then be seen opening fire on the troopers. Kelly began shooting back and was struck on his leg and neck before crawling under a guardrail to seek cover.

The rear window of Clary's vehicle was also shot by officers but he still drove away.

PA Gun battle 4

Clary had struggled with the officers before going to his car and getting a gun, then opening fire. (Handout)

First Deputy District Attorney Terence Houck told LehighValleyLive.com the video was released to show the dangers officers face while they are on duty.

"We think the community should see it," Houck told the news outlet.

WOUNDED ORLANDO OFFICER'S SON ESCORTED BY POLICE TO FIRST DAY OF KINDERGARTEN

Authorities said Kelly likely saved his own life by using a tourniquet he carried on him.

"The troopers were in a knock-down, drag-out fight along the side of the road with vehicles speeding by them, and it got very, very violent," State Police Captain Richard D'Ambrosio said after viewing the video of the altercation.

Houck told The Morning Call he always wanted the video to be released to the public, but needed to make the officers agree to it.

“Our concerns have always been the victims, the state troopers in this matter, protecting them,” Houck told the newspaper. “But after speaking with them, they wanted it released, as did I.”

PA Gun battle 3

Clary was convicted last month of multiple felonies, including attempted murder of two law enforcement officers. (Handout)

Clary was convicted last month of multiple felonies, including attempted murder of two law enforcement officers. The 22-year-old is still awaiting sentencing, but could face decades in prison, according to the Morning Call.

The Associated Press contributed to this report.