Alabama Governor Robert Bentley on Monday resigned rather than face impeachment over a sex scandal.

“I have decided it is time for me to step down as Alabama's governor,” Bentley, a Republican, said in a brief statement that left out why he had resigned.

According to The New York Times, Bentley on Monday pleaded guilty to two misdemeanor charges: failing to file a major contribution report and using campaign contributions for personal use.

Lt. Gov. Kay Ivey succeeded Bentley.

Bentley has repeatedly said that he said inappropriate things to Rebekah Caldwell Mason, a former top aide, but denied they had a physical relationship. Whether Bentley abused his position to cover up an affair was the subject of several investigations.

As governor, Bentley strongly defended the state's ban on same-sex marriage. In a filing to the U.S. Supreme Court, Bentley's lawyers argued that such unions should be seen as “social experiments” and that allowing gay couples to marry destroys the “rights of children to be connected to their biological parents.”

Last year, Alabama Chief Justice Roy S. Moore was effectively removed from the bench for defying the Supreme Court in a case that struck down Alabama's ban on same-sex marriage.

(Related: Alabama Supreme Court Chief Justice Roy Moore suspended for remainder of term.)