TOWNER, N.D. (AP) — A Minnesota man has been sentenced to spend 10 years in prison for attacking a priest in North Dakota in an apparent dispute over a woman.

Authorities say 43-year-old Chad Legare, of Alexandria, Minnesota, attacked the Rev. Robert Wapenski at St. Francis Xavier Catholic Church in Anamoose in January 2018. Wapenski was beaten and had computer speaker wire wrapped around his neck, rendering him unconscious.

Legare in November entered an Alford plea to attempted murder. The court treats it as a guilty plea.

Legare was sentenced Monday. Defense attorney William Hartl said Legare believed he was justified in defending the woman. Prosecutor Josh Frey said there was no defense for the violent attack.

Judge Donovan Foughty sided with the prosecution's recommendation that Legare spend 10 years behind bars and five years on probation.