WEBSTER, S.D. — A Roslyn man who fatally shot another man during a burglary two years ago has been found guilty of first-degree murder.

Forty-six-year-old Jason Lewandowski was convicted by a jury Friday on multiple counts, including first-degree murder while engaged in a burglary. He was immediately sentenced to mandatory life in prison.

Both prosecutors and the defense agreed Lewandowski shot Jeremy Hendrickson in 2015, but Lewandowski’s lawyers argued the shooting was not premediated. They had hoped he’d be convicted of manslaughter.

According to KSFY-TV, Lewandowski testified Thursday that he didn’t remember pulling the trigger and realized he shot Hendrickson only after walking away from the home.

Lewandowski originally pleaded not guilty by reason of insanity. Last month, a judge rejected a plea deal in which Lewandowski would have pleaded guilty to manslaughter.