NAMPA, Idaho (AP) — A 25-year-old man who pleaded guilty to aggravated battery for a shooting at a Caldwell residence has been sentenced to two to 10 years in prison. The Idaho Press-Tribune reports 3rd District Judge Molly J. Huskey sentenced David Salas of Caldwell on Monday.

He could be out of prison and on probation in a year if he completes court-ordered counseling programs. Salas was arrested a year ago after a shooting he said was an accident. A bullet passed through a man and a wall and hit a woman in the arm. She suffered minor injuries, but the man was hospitalized in critical condition.

He later died, but Salas was not charged for the death because it wasn't clear that the shooting killed the man.