Editor's note: This story has been updated to reflect the execution.

More than 18 years after killing five people with five shots from a hunting rifle, Coy Wayne Wesbrook, 58, was executed Wednesday evening. At his trial, Wesbrook testified that he “lost it” when his ex-wife invited him to her Channelview apartment and then had sex with two other men, according to court documents.

"I want to say that I am sorry for the pain that I have caused you people. I am sorry that I cannot bring everybody back. I wish it could be different," Wesbrook said before he was executed by lethal injection, according to the Texas Department of Criminal Justice

With no pending appeals, Wesbrook told an Associated Press reporter during a recent prison interview that he had “no doubt” he was going to be put to death.

The Texas Tribune thanks its sponsors. Become one.

"I'm sorry it happened," he told the AP. "But I'm not going to sit here and boo-hoo about it."

On the evening of Nov. 13, 1997, Wesbrook went to meet his ex-wife, Gloria Coons, at her apartment under the impression that she wanted to reconcile, according to his original testimony. Instead of finding her alone, though, Wesbrook walked in to find Coons drinking with her roommate, Ruth Money, and two male friends, Anthony Rogers and Kelly Hazlip.

Wesbrook said later in the night, conversation turned sexual, and Coons walked into the bedroom with Hazlip. Rogers soon followed, and when Coons came back out, she said she had performed oral sex on Rogers and was about to have sex with Hazlip.

“It awes me. It just flat – just flat awes me,” Wesbrook said during his trial in 1998. “I mean, I just couldn't get over what was going on in front of me.”

After attempting to leave and having his keys taken by another man who showed up later, Antonio Cruz, Wesbrook got his .36-caliber hunting rifle from the cab of his truck and walked back inside, he testified.

Within about 40 seconds, he fatally shot all five people in the apartment, according to court documents.

The Texas Tribune thanks its sponsors. Become one.

"You hear all your life if you catch your old lady in bed with somebody, don't just shoot her but shoot her lover too," Wesbrook told the AP. "In her case, there was a bunch of lovers. I just took care of my business.”

State prosecutors argued that Wesbrook’s account didn’t match with the wounds and positioning of the victims, according to court documents, claiming that Wesbrook went to Coons' apartment with the intention of killing her.

He was convicted in the murders of Coons and Cruz and sentenced to death in 1998. Since then, the Texas Court of Criminal Appeals has twice handed the case back down to the trial court to review claims of an intellectual disability, according to court documents.

Both times, the trial court found the claims insufficient, and the Court of Criminal Appeals upheld the conviction and sentence, according to documents.  

Wesbrook’s attorney, Don Vernay, said the “travesty” in this case is the court’s decision on his client’s intellectual disability.

“The question of his guilt was not an issue,” Vernay said. “In my mind, he fit the criteria [for intellectual disability]. This execution should not happen, but it’s Texas, man.”