Before she was killed in July 2013, Karen Shahan sent an email saying she knew of her husband's sexual preferences and his attempts to carry on surreptitious romantic relationships with two men outside of Alabama, according to prosecutors.

Richard Shahan, formerly a pastor in Homewood, was charged last January in connection with his wife's murder. He is set to appear in court for a pretrial hearing Thursday morning before Jefferson County Circuit Judge Laura Petro.

In a document filed Wednesday, prosecutors responded to a request from Shahan's attorneys, Wendell Sheffield and John Lentine, seeking specific facts necessary to prepare the defense.

Witnesses, numerous emails and statements from Shahan himself demonstrate that he was involved in romantic relationships with a man in Nashville and another in Europe, Deputy District Attorney Patrick Lamb wrote.

In an email sent to an unidentified recipient in February 2012, Karen Shahan wrote that she told Richard that he had to choose between the two lives he was trying to maintain, according to the prosecution's filing.

"I told him that he cannot keep both lives. That he will have to lose one of them. I said that if he was having any interactions that were not right before God that he should go to God and be completely honest with him because he knows anyway. I told him that God will reveal it to me. I told him that any texting or gmailing that does not bring glory to God has to go..."

Karen Louise Shahan's body was discovered about 11:15 a.m. July 23, 2013, inside the family's Hugh Circle home. She was stabbed to death and had several small defensive wounds, according to court filings.

In the document filed Wednesday, prosecutors say that email and text message conversations between Richard Shahan and his two "paramours" include explicit sexual statements, as well as a reference to Karen's death:

"I'm in a legal marriage contract [sic]. There is not an acceptable way for me to dissolve that and continue with the things that are important to me (my job and children)...There is only one way I could become legally 'single' and I have to wait until God grants me that gift. It will come; the woman I live with is slowly killing herself - she is diabetic and refuses to take care of herself physically. Her mother died early with the same disease and did the same thing to her body. So I pray and wait. It will happen in God's timing."

The filing states that Shahan also wrote emails noting that, because of his job, his sexual preference had to be kept secret and he could not get divorced. In a November 2011 message to his European paramour, Shahan mentions his hopes for the future.

"And then I find myself thinking about and picturing myself packing up and leaving my life and moving to Scotland and the two of us living together for the rest of our lives. (I actually was standing in my closet the other night thinking, now which clothes would I pack up to move to Scotland). Or I find myself picturing you living with me in the house here and us living our lives day to day in Birmingham."

He also emailed a British attorney for advice about marrying another man and receiving "permanent immigration" status in the U.K.

Richard Shahan was jailed for "investigative purposes" in August 2013, but was released without being charged. Shortly after his release, the pastor took paid administrative leave from his post as Children and Families Pastor and the Facilities Director at First Baptist, and he resigned Dec. 31, 2013.

He was arrested Jan. 1, 2014, at a Nashville airport while trying to board a plane to Germany. He was extradited and returned to the custody of Jefferson County authorities.

At the time, Sheffield and Lentine disputed the representation of Shahan as a "fugitive from justice," saying he had announced his plans to travel and conduct mission work months earlier.

In a motion filed in February, Shahan's attorneys asked whether prosecutors alleged that Shahan was solely responsible for Karen's death or whether he was complicit in it. At the preliminary hearing, they questioned whether the state had "direct evidence" of Shahan's involvement in his wife's death.

"They are doing everything they can to try to manufacture a murder case," Lentine said at the time.

In his response to the motion, Lamb noted that the evidence is circumstantial and gave the prosecution's position on Shahan's role.

"Clearly, the State believes the Defendant attempted to create an alibi, covertly returned to Birmingham, and was present when Karen Shahan was killed," he wrote. "While it is probable that Defendant personally killed his wife, it is possible he had an accomplice."

Lamb laid out this account of Richard Shahan's movements on the day of Karen's death:

Shahan traveled to Franklin, Tenn., for a vacation and planned to visit their two sons, one in Nashville and the other in Kentucky. After reserving a room at a hotel, he turned his phone off at 3:25 p.m. and bought something at Wal-Mart shortly afterward.

During an interview, he said he watched two movies in Franklin, but in a later interview he said he returned to his Birmingham home to retrieve a breathing machine. Driving from the Franklin, Tenn., hotel to Birmingham takes approximately three hours.

Based on digital records, his activity resumed at 2:30 a.m. the next day when he opened his hotel door.

Karen Shahan returned home from work around 9 p.m. and was found dead the next day. Richard Shahan denies seeing Karen that day and has maintained his innocence in her death.

At a preliminary hearing in January 2014, prosecutors said that information from more than 3,000 of Shahan's emails indicated that he planned to leave the country to get married in Europe.