A husband caught his wife cheating, and now he’s facing up to 15 years in jail.

Sean Donis’s wife, Nancy Donis, 38, said she was going to dinner. Donis stayed behind to watch their 5-year-old son. When he couldn’t find his iPad, he turned on the Find My iPhone app to locate it.

The software showed the electronic device moving toward an unknown location; he had a hunch that his wife had taken it, and he decided to follow. He arrived at a house and opened the unlocked door. On the second floor, he found his wife in bed with her boss, Albert Lopez, 58. With his iPhone, he recorded two brief videos of them in bed.

The New Jersey man got a letter last July informing him that a grand jury had indicted him on charges of felony burglary and unlawful surveillance for the April 2016 incident.

“I feel like it’s unjust what they’re doing to me,” said Donis, 37, to the New York Postin September. “It’s like I’m being punished twice.”

He appeared in court in September, where he pleaded not guilty. His second appearance happened on Friday.

“I was in fear,” Lopez testified of the moment when Donis caught him in bed with his wife. “I kept telling him, you need to get out of here,” Lopez told the jury hearing Donis’s felony burglary case.

Donis’s wife worked for Lopez as the billing manager for his orthopedics practice.

Lopez said he was so desperate to get the enraged husband out of his home that he asked Donis “if he wanted to die.”

“Kill me. I don’t care,” he said the desperate husband responded.

The incident left Lopez traumatized. “I couldn’t go to sleep. I had repeated memories of what occurred. I started to go through the house and check all the doors and make sure they were locked,” he said.

Lopez also noted that Donis’s wife said they were separated, and he thought Donis was out of the picture.

The husband’s lawyer, Howard Greenberg, told jurors that the husband actually “deserves a medal,” not a prison sentence, for uncovering his wife’s unfaithfulness without physically harming his rival.

“The defendant should be given a medal for the amount of restraint he showed when he entered that scene,” Greenberg told the jury.

However, despite the fact that Lopez slept with Donis’s wife, prosecutor Nabeela Mcleod asserted that Lopez was a victim — a victim of Donis’s breaking and entering his home and recording him and Donis’s wife without their consent (Donis shared the videos with his wife’s relatives). He now faces a possible maximum sentence of 15 years in prison.