A man convicted of attempted murder for opening fire on two Pennsylvania state troopers during a traffic stop last fall was sentenced Friday to up to 110 years in prison.

Daniel Clary, 22, shot and critically wounded 13-year veteran Cpl. Seth Kelly, who was helping another trooper arrest Clary in Northampton County. Clary had been pulled over for speeding and failed field sobriety tests.

A judge sentenced Clary to 55 ½ to 110 years in state prison.

Kelly, who was shot four times and nearly bled to death, spending 12 days in a medically-induced coma, confronted his assailant in court.

"If you would have cooperated ... and not taken the law into your own hands, none of this would have happened," Kelly told Clary. "I pray you never get released from prison."

During the confrontation, the troopers hit Clary with a stun gun and wrestled him to the ground, but he managed to break free, retrieve a pistol from his car and open fire on Kelly and Trooper Ryan Seiple. Both troopers returned fire, hitting Clary several times. Clary then fled and drove himself to a hospital.

The wild roadside battle, which played out as cars hurtled past, was captured on a police dashcam video that was released to the public after trial.

Clary's lawyer tried to argue that her client feared for his life when he shot at the troopers.

His uncle, David Clary, testified that he had brain damage from sports and from being assaulted, calling him a "good kid."