Former Michigan state representatives Todd Courser and Cindy Gamrat were hit with felony charges on Friday for their messy cover up of an extramarital affair last year, the Detroit News reported.

Attorney General Bill Schuette charged both former GOP lawmakers, who served on the state House Ethics Committee, for allegedly lying to state officials about the nature of their relationship and their efforts to conceal it.

Gamrat was charged with two counts of misconduct for providing false information to the state House Business Office and allowing a staff member to forge her signature in an effort to accelerate the filing of a piece of draft legislation, according to the Detroit News.

Courser, who conjured up a fake gay sex scandal with a male prostitute in order to divert attention away from his relationship with Gamrat, was charged with a count of perjury and three counts of misconduct, according to the report. The charges stemmed from Courser allegedly lying to the House committee investigating the two lawmakers, instructing aides to forge his signature on bills, and asking his former aide Ben Graham to send a fake email to state Republicans.

It was that email that ended up unraveling Courser’s elaborately laid plans.

Courser asked Graham to anonymously inform GOP activists that he had been seen having sex with a male prostitute “behind a Lansing night club.” The email was intended to make rumors of his relationship with Gamrat seem implausible.

Graham was fired after refusing to send the email, and subsequently sent secret audio recordings of the conversation to the Detroit News.

The ensuing scandal shocked the Capitol, prompting Courser to resign and Gamrat to be forced out in a late-night vote on the state House floor.

“When you hold the public trust, and there’s questions of misconduct in office and that you lied under oath, I think those are serious,” Schuette, the attorney general, told the newspaper. “Those are real.”

Courser could face up to 30 years in prison if convicted on all four counts against him, while Gamrat could be sentenced to a maximum of 10 years, according to the report.