Pedro Hernandez freely confessed during a prayer meeting to the 1979 kidnapping and killing of Etan Patz because it allowed him to feel forgiveness without having to face legal consequences, a forensic psychiatrist testified Thursday.

"He felt relief. He felt forgiveness . . . he felt he did not have to go to the police," Dr. Michael Welner testified at Hernandez's murder trial in state Supreme Court in Manhattan. Witnesses from a New Jersey religious group testified earlier in the trial that Hernandez told them he had killed a boy.

Those statements, as well as one videotaped statement Hernandez made to police and one he made to prosecutors, constitute the bulk of the prosecution case against Hernandez, now 54, of Maple Shade, New Jersey.

Welner was called as a rebuttal witness by the prosecution to counter a defense contention that Hernandez had a low IQ and suffered from mental impairment that led him to make a false confession.

Etan was last seen on the morning of May 25, 1979, as he went to catch a school bus in SoHo. Hernandez told police in 2012 that while he was a teen working at a SoHo bodega, he lured the boy into the store basement and strangled him. The boy's body has never been found.

Hernandez was questioned by police in 2012 based on a tip. He first confessed at the end of a lengthy NYPD interrogation, then gave a third videotaped statement, lasting three hours with two rest breaks.

Welner interviewed Hernandez for 18 hours over four days in February and March of 2014, and snippets of those were played for the jury Thursday over the objections of defense attorney Harvey Feishbein, who said prosecutors were trying a "backdoor" move to introduce "garbage" about the defendant's cocaine and alcohol abuse.

advertisement | advertise on newsday

In one of those clips, Hernandez again says that he strangled Etan, but said the youngster was still moving when he carried him out in a sack and dumped him in an alley about a block-and-a-half away.

He said he returned to the alley the next morning because "I wanted to see if he was dead," but there was nothing in the alley.

He said he thought someone had found Etan "alive and took him somewhere else."

At another point, he told the psychiatrist that Etan "might be alive somewhere . . . I don't know."

Welner said he questioned Hernandez repeatedly about why he had strangled Etan but he never got an answer. "He didn't resolve those questions in our interview," the psychiatrist said.

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

Welner is expected to face cross-examination when the trial resumes Monday before Judge Maxwell Wiley.