SALT LAKE CITY — A Utah police officer who killed his wife, their two children, his mother-in-law and then himself received text messages from his wife just hours earlier threatening to leave him and take their kids and confronting him for raping her, new documents show.

A Spanish Fork police report shows Joshua Boren and his wife exchanged heated texts the night and morning before the January killings.

In them, Kelly Boren confronted her husband about raping her and told him their marriage was over, The Deseret News reported. The couple already had been separated for some time.

Joshua Boren’s therapist told authorities that Boren drugged his wife and videotaped himself sexually assaulting her on more than one occasion.

Kelly Boren learned of the assaults when she discovered the tapes in 2013, said Spanish Fork police Lt. Matt Johnson. She told a few friends, but she did not report the assaults to police because she didn’t want to ruin her husband’s law enforcement career, the report says.

The night before she was killed, Kelly Boren brought up the alleged sexual assault again, texting the word “rape” to her husband four times, the documents show. “I hate my life because (of) you,” she texted. “You killed a part of me.”

She wrote in another text: “I don’t want to live in fear and hate and anger.”

The next morning, Kelly Boren told her husband she would take the kids, prompting Joshua Boren to reply by text: “Don’t involve the kids, they are innocent.”

The police report says Joshua Boren was sexually abused as a child, struggled with drug addiction as a young man and pornography addiction throughout his life, and had a deep-rooted hatred for his mother.

After his father committed suicide when he was 5, Joshua Boren’s mother began using drugs and seeing several men, the report states. One of those men allegedly abused Joshua Boren, and he blamed his mother for not protecting him, his sister told police.

The therapist told police Boren was like a “3-year-old boy stuck in a big man’s body.”

“Josh was a very troubled individual that felt like he was about to lose his wife and children,” police wrote in the report.

Joshua Boren had worked for the Lindon Police Department for only three months when the murder-suicide occurred. Before that, he was a Utah County sheriff’s deputy for seven years, Johnson said.

He used the service weapon he was given for his duties as a Lindon police officer when he killed his family members and himself, authorities said. Toxicology reports from the autopsy show he had no drugs or alcohol in his system.

Police said the state medical examiner confirmed what investigators believed: Joshua Boren shot his wife, 32-year-old Kelly Boren; his 55-year-old mother-in-law, Marie King; and his two children, 7-year-old Joshua “Jaden” and 5-year-old Haley, before killing himself.

The shooting happened at the family’s home in Spanish Fork, a city of about 37,000 located 50 miles south of Salt Lake City. The events stunned the community, as well as friends and family, said Johnson, who added investigators didn’t find anybody who suspected Joshua Boren was capable of such an act.

Though Joshua Boren wasn’t living at the house, friends and family said he still came every morning to get the kids ready for school and preschool, Johnson said. He also picked them up every afternoon.

“He was praised as being an excellent father,” Johnson said.