But during a blistering cross-examination by Bucks County District Attorney Matt Weintraub, the doctor admitted that he couldn’t tell if Jacob Sullivan — whom he described as having intelligence “in the superior range”— lied to him in order to ensure he’d testify favorably before the jury.

The jury deciding whether Jacob Sullivan will live or die for the rape and murder of 14-year-old Grace Packer heard from a psychologist Friday who testified that Sullivan was “substantially dominated” by Sara Packer.

Sullivan so wanted to please Packer, Grace’s adoptive mother, that he went along with her plan to have him rape Grace in front of her to satisfy her sexual fantasy, Dr. Frank Dattilio testified.

“The worst was brought out of him, I believe, by this relationship,” Dattilio told the jury. “It became a slippery slope.”

But during a blistering cross-examination by Bucks County District Attorney Matt Weintraub, Dattilio admitted that he couldn’t tell if Sullivan — whom he described as having intelligence “in the superior range”— lied to him in order to ensure he’d testify favorably before the jury.

Sullivan, 46, pleaded guilty last month to first-degree murder, rape of a child and other felonies. A jury is now hearing evidence before determining if he should serve life in prison or the death penalty for Grace’s July 8, 2016, killing.

Dattilio told the jury that Sullivan was sexually abused as a child and became interested in deviant sex from a young age. The psychologist said Sullivan grew up in a San Francisco household where “strange and exotic” sex was the norm, and “traditional boundaries in regards to sexual relations did not apply.”

After moving to Pennsylvania as a teen with his mother and stepfather, Sullivan was forced to become a Jehovah’s Witness, Dattilio said.

Sullivan, a father of four, wanted to have sex with multiple partners at once. His marriage broke up because his wife wasn’t interested, Dattilio said. He found a kindred spirit in Sara Packer, a former Northampton County adoption supervisor, when they met in 2013.

“He liked her because she was very intelligent and took control of the relationship, which is what he wanted,” Dattilio said.

The psychologist said Packer told Sullivan what to do.

“She was very smooth in her way of dealing with him,” Dattilio told the jury. “She could manipulate him. If she threw out a fantasy, he would do whatever he could to follow it.”

In her testimony Wednesday, Packer contradicted the psychologist’s assessment. She said Sullivan was the controlling partner in the relationship. She also said she participated in the rape and murder of her daughter to please him.

“I got wrapped up in Jake’s fantasy,” she told the jury. “I didn’t think I could tell him no without losing him.”

During cross-examination, Weintraub played Dattilio a snippet of Sullivan’s confession to detectives in which Sullivan said Packer “liked him to be in charge of the relationship.”

As part of his guilty plea, Sullivan admitted that he and Packer brought Grace to a Richland Township home they were renting on July 8, 2016, and that he raped the teen while her mother watched. They then fed Grace what they believed to be a fatal dose of over-the-counter sleep medication before leaving her gagged and hog-tied in a sweltering attic for 12 hours.

Finding her still alive, Sullivan strangled Grace, he admitted. Police say he and Packer hid Grace’s body in cat litter for months in their attic before dismembering it and dumping her remains in Luzerne County, where hunters found it in October 2016.

In court Friday, Weintraub repeatedly asked Dattilio if he’d investigated Sullivan’s version of the crime. Dattilio eventually conceded that he could not be sure Sullivan was telling him the truth.

As the exchange between the district attorney and witness became more heated, Sullivan leaned back in his chair and craned his neck to see Weintraub, staring angrily at the prosecutor for nearly a minute.

Jurors also heard more information Friday about Sara Packer’s alleged knowledge of her ex-husband’s sex crimes when the family lived in Allentown.

Sullivan’s attorneys read a statement from a 28-year-old woman who was sexually assaulted by Sara’s ex-husband, David Packer, when she was a teenager.

In the statement, the woman wrote that she came to live with the Packers at their North Fulton Avenue home in 2007, when she was 15 years old. Within four months, she wrote, David Packer began sexually abusing her.

The woman wrote that Sara Packer did not join in on the sex until she was 18, which meant that the acts were legal.

But during the prior two years, David Packer bought “kinky” outfits for the teen to wear that were kept in Sara’s closet, she wrote. She also said her bedroom was next to the Packers, and David Packer would often tie her to her bed overnight, and she would yell for hours because she needed to use the bathroom. Based on those facts, Sullivan’s lawyers said, the former foster child believed Sara Packer knew what her husband was doing.

On Wednesday, another former foster child of the Packers testified that she found sexually explicit photos of the Packers and that teen on a cellphone in the house and called police.

David Packer eventually pleaded guilty to sexually assaulting both that girl and Grace, and was sent to prison. Two Allentown police detectives involved in that case were at the courthouse Wednesday, but they were not called to the stand.

Another foster child testified that Sara Packer often physically abused Grace. She said she reported the abuse at least three times to her caseworker at The Impact Project in Emmaus, which placed foster children in the Packer’s home, but she was ignored.

The hearing ended abruptly Friday after the defense called a prison expert to the stand. James Aiken was telling the jury that a person like Sullivan, who is older than most inmates and has committed a sex crime against a child, would be a target of violence from other prisoners and require protection.

“His safety is the No. 1 priority,” Aiken said.

Judge Diane E. Gibbons excused the jurors from the courtroom, then asked Sullivan if he realized that, if the line of questioning continued, Weintraub would be able to argue that Sullivan was afraid of being victimized by his fellow inmates the same way he victimized Grace.

When Sullivan and his attorneys could not agree on the best way to proceed, Gibbons said she would give them the weekend to discuss it and recessed until Monday.