The devil may have made him do it, but it was Jesus who made him confess.

An Arizona man shocked cops in the East Village this week by walking into the local precinct and announcing that he’d strangled a woman on East 13th Street during an argument in 2004 – and that Jesus Christ wanted him to turn himself in.

Authorities said the confession has solved the previously cold-case murder of Myrna Gonzales, a 45-year-old homeless woman whose body was found folded into a large steamer trunk in a vacant lot at East 13th Street and Third Avenue.

“We wish Jesus would solve more of these,” one law enforcement source said.

Michael Mohr, 51, might have gotten away with the slaying. But he’d recently had a religious conversion, and realized Jesus wanted him to do the right thing.

Gonzales’ body was found June 6, 2004, in a vacant lot outside Mohr’s building.

“He was relieved,” said one law enforcement source. “He was a little emotional. He was just glad to get it off his chest.”