BOISE -- A Boise man who was shot by police after pointing a handgun at an officer last year has been sentenced to 30 years behind bars.

Patrick Anthony Zavala, 39, will be eligible for parole after serving 20 years of that sentence.

According to the Ada County Prosecutor's Office, Zavala was on parole when an officer tried to pull over the car he was riding in near the intersection of Rose Hill and Peasley Street Oct. 26, 2015. Zavala jumped out of the car and ran, carrying a loaded gun.

MORE: Boise police officer cleared in shooting

When Officer Adam Crist caught up to the suspect in a nearby backyard, Zavala pointed the gun at him. Crist opened fire, hitting Zavala in the leg. Zavala also discharged his own gun, hitting himself in the hand.

He was taken to a hospital for treatment before being booked into the Ada County Jail. Crist was cleared of wrongdoing in the shooting in March.

A jury convicted Zavala of unlawful possession of a firearm by a convicted felon, aggravated assault on an officer and two counts of resisting and obstructing in September. He was also found to be a persistent violator because he had multiple prior felony convictions.