Updated

A poker-playing priest sought divine payback, downloading a cache of child porn to spite God after the clergyman lost big at a card game.

Fr. Kevin Gugliotta, 55, was sentenced on Thursday to between 11 and 23-and-a-half months in prison after pleading guilty in March to having child porn on his personal computer. The Roman Catholic priest, who kept the porn at his vacation home in Gouldsboro, N.J., claimed he downloaded the illicit material to take vengeance on God, whom he blamed for lost poker tournaments, WNEP reported.

"That was his reason,” defense attorney James Swetz said. “He's not happy that that's how he felt and as the judge indicated, look, there are other ways to handle issues and handle anger.”

MICHIGAN PRIEST ACQUITTED OF SEXUALLY ASSAULTING PRIEST

priest2

Gugliotta said in court he kept the cache of child porn to take vengeance on God for losing in high-stakes poker tournaments. (Wayne County District Attorney)

Gugliotta, a former priest who worked at Holy Spirit Roman Catholic Church, was dismissed from the Union, N.J., parish according to the Archdiocese of Newark.

“While he’d prefer this didn’t happen, he’s used this nine, ten months almost as a retreat,” said Fr. Gabriel Costa of the Archdiocese of Newark. “He’s prayed a lot.”

Apologizing in court for his crimes, Gugliotta said he has also fasted to repent for the crimes.

Wayne County District Attorney Janine Edwards said it doesn’t matter what reasoning Gugliotta gave for his crimes -- what’s important is that he admitted he did it and is sorry.

“However, we can’t reach out to these victims,” Edwards said. “There are children out there who have been harmed greatly by the fact he sat and downloaded and watched on multiple occasions.”

Some of Gugliotta’s colleagues who came to support him during the sentencing were caught off-guard by the revenge defense.

"That was a surprising thing in the court, sure, when I heard that, but people do things under stress that they normally wouldn't do," Fr. Costa said.

Gugliotta has already served 10 months of his prison sentence and could be released in about a month. He will now have to register as a sex offender for 25 years, serve a five-year probation following his release and is no longer allowed to gamble.