A judge on Monday ordered a man who chained his girlfriend to an engine block to spend up to five years in a Utah prison.

In a plea deal with prosecutors, Fernando Orozco-Trevizo pleaded guilty to one count of third-degree felony assault for tethering his girlfriend to an engine with a 20-foot dog chain.

His attorney told a judge the woman had asked to be chained in order to show her devotion.

Third District Judge Randall Skanchy rejected the argument and says Orozco-Trevizo, who is in the U.S. illegally, should also be deported.

A jail affidavit says Orozco-Trevizo told police he chained the woman up because he feared she was having an affair.

The woman was rescued in December after a neighbor saw "call 911" written in the condensation on a window.