A Republican state lawmaker from Georgia opposed to marriage equality has admitted to being “involved” in the website Ashley Madison.

State Rep. Allen Peake of Macon confessed in an email to having used the site, which is devoted to married men and women looking to have an affair, several years ago.

“[T]he truth is that several years ago, I was on this site during a very difficult period in my marriage,” Peake said Sunday in an email to friends and family. “It was stupid and I was an idiot for going on there. Two and a half years ago I told her about every detail of my involvement on this site.”

“Through tears and heartache, much pain and anguish, and with intense professional counseling, we made the decision to work to save our marriage. Her powerful and merciful gift of forgiveness helped us make it through some very dark and lonely days, and come out the other side with a stronger relationship and marriage. Forgiveness is indeed life-changing, and miraculous.”

As recently as May, Peake, who has a gay brother, reiterated his opposition to marriage equality.

In discussing his support for a so-called religious freedom bill that critics say would open the door to discrimination based on sexual orientation and gender identity, Peake said, “I want to make sure [my brother] is never discriminated against for his sexual orientation.”

“But I also want to balance the fact that there are those who have a religious conviction that ought to allow them to not be involved in an activity that would violate that religious conviction. That's a fine balance that has to be taken,” he added.

After Ashley Madison refused to shut down, hackers last month released the records of millions of people who have used the site.