American Idol / YouTube | Inset: Tipp City Schools

More than 100,000 text messages between a former “American Idol” contestant and his mistress are taking center stage in his wife’s murder trial, including one chilling message prosecutors say reveals a possible motive for the killing.

Caleb Flynn is accused of fatally shooting his wife, Ashley Flynn, inside their Tipp City, Ohio, home on Feb. 16 and staging the scene to look like a break-in. Flynn has pleaded not guilty to aggravated murder and other charges.

Prosecutors say Flynn exchanged more than 100,000 messages with his mistress during a year-long affair before Ashley’s death. Among them was one message in which he allegedly discussed killing his wife while avoiding prison.

“I was up until 4 a.m. last night crying, literally trying to think of ways to kill her and not go to jail,” Flynn allegedly wrote, according to WHIO.

Miami County Prosecutor Paul Watkins told jurors the messages showed Flynn repeatedly expressing anger toward his wife and a desire to be free of his marriage so he could pursue a future with his mistress.

Another alleged message sent just one day before Ashley was killed could also play a major role in the prosecution’s case. Fox News legal analyst Josh Ritter said Flynn indicated that the following day would be one he would never forget and that he would make his choice for his mistress.

“If we were curious at all about how the prosecution would attempt to prove motive in this case, it became abundantly clear during opening statements,” Ritter said.

Flynn’s defense has acknowledged the affair but argues that infidelity does not prove murder. Defense attorney Emily Smith told jurors the prosecution is relying on circumstantial evidence and argued that Ashley deserves justice based on evidence rather than speculation.

The trial has also turned to physical evidence from inside the Flynn home.

A veteran crime scene investigator testified that damage to the garage door did not appear consistent with burglaries he had investigated and appeared to have occurred while the door was open. After spending about 12 hours examining the home, he concluded that the scene appeared to have been staged.

Prosecutors allege Flynn used a 9mm handgun to kill Ashley. Investigators were told Flynn kept a loaded handgun in the center console of his Ford F-150, but the gun and ammunition were not found there.

Flynn called 911 after the shooting and claimed someone had broken into the home.

“Oh my god, somebody broke into my home, somebody broke into my home and shot my wife,” Flynn told the dispatcher. “My wife, she’s got two shots to her head, there’s blood everywhere.”

An FBI agent also testified that investigators canvassed more than 80 homes searching for surveillance footage or other evidence that could support Flynn’s account that an intruder had been in the neighborhood.

Flynn previously appeared on “American Idol” and publicly spoke about his love for Ashley during a 2013 hometown interview connected to the show.

Ritter called the alleged messages “really, really damning evidence,” but emphasized that Flynn remains presumed innocent. His defense maintains that investigators focused on Flynn too quickly and that prosecutors have not proven he killed his wife.

More from Beliefnet and our partners