ROCHESTER, N.Y. -- A Rochester man who now admits to ordering his pit bull to attack a woman has taken a plea deal in exchange for a sentence of four years in prison.

James Cruz pleaded guilty to assault in the attack, which happened during the early morning hours of Nov. 30, 2016 on Rockview Terrace in Rochester.

Cruz initially told police the dog got loose and attacked his girlfriend, and he was unable to get the dog off of her. The woman underwent several surgeries as a result of her injuries.

Three officers shot and killed the dog, and in the fray, a bullet accidentally hit Cruz, but he was not seriously injured.

Cruz will officially hear his sentence, which includes three years of post-release supervision, on June 14.