One Michigan state representative resigned early Friday and a second was expelled from the House amid an investigation over a sexual affair between the two and a bizarre attempt to cover it up involving a phony email sent by one of the lawmakers.

Republican Rep. Todd Courser announced his resignation on the floor of the House shortly after 3 a.m. amid an all-night debate over whether to expel him and Rep. Cindy Gamrat over their liason. Courser said his resignation was "appropriate" and was effective immediately. He was subsequently escorted out of the chamber. Gamrat was expelled moments later.

On Thursday, a special six-member House disciplinary committee recommended the expulsion of both legislators. But the full GOP-controlled chamber had been deadlocked for hours.

Sixty-seven members supported expelling Courser, six short of the two-thirds supermajority needed under the state constitution. More than two dozen minority Democrats abstained from voting and criticized the process.

"I just felt like it was the appropriate moment to do it," Courser told reporters. "I put everybody through a whole bunch -- across the state, my own family, the constituents, the people in this room. ... Whether it was the third vote or the fourth vote or the fifth vote, they were going to eventually get me."

Courser, 43, of Lapeer, has admitted sending an "outlandish" phony email to GOP activists and others in May claiming that he was caught with a male prostitute. The email was intended to make his affair with the 42-year-old Gamrat appear less believable if it were exposed by an anonymous blackmailer who Courser said was demanding his resignation.

The self-smear email called Courser a "bi-sexual porn addicted sex deviant" and "gun toting Bible thumping ... freak" and Gamrat a "tramp."

Gamrat has said she discussed the plot with Courser but did not know the email's sexually explicit content before it was sent.

Both apologized. Courser had previously said he would not resign.

In calling for both lawmakers' expulsion earlier in the day, Rep. Ed McBroom, a Republican from Vulcan in the Upper Peninsula who chaired a disciplinary panel, said: "These two members have obliterated the public trust. They've obliterated the trust of their colleagues. And each day that they continue here they reduce the public trust in this institution."

Democrats, however, attacked the "sham" investigation as rushed and self-serving, and they questioned why two "whistleblower" aides to Courser and Gamrat were allowed to be fired by GOP leadership, since the speaker's office knew of problems in the lawmakers' combined office. They said the matter should be looked into by law enforcement and the former aides subpoenaed to testify to lawmakers.

The scandal unfolded last month after a staffer the couple shared was fired in July. Ben Graham gave The Detroit News a secret audio recording of Courser demanding that he send the email to "inoculate the herd," an apparent reference to Courser's supporters. While Graham refused and the email was likely legal, the plot was unethical, according to a House Business Office probe that alleged dishonesty, misconduct and misuse of public resources extending beyond the affair and fictional e-mail.

The investigation also said while the speaker himself knew of no work-related issues regarding Graham or another staffer, House Speaker Kevin Cotter's then-chief of staff did. The House "in hindsight" should have further inquired, the report found.

State police are investigating the alleged blackmail and this week obtained a warrant for records from a phone company related to a prepaid, or "burner," phone from which Courser said he received threatening text messages.

Click for more from The Detroit News.

The Associated Press contributed to this report.