Inside the Sexting Scandal That Cost Outgoing Alabama Governor Robert Bentley His Job - and Put Him in Jail

After over a year of scandal, Alabama Governor Robert Bentley has resigned.

The outgoing governor, who is leaving office in the middle of his second term, has been plagued by scandal since the revelation of an affair with his former senior political adviser, Rebekah Caldwell Mason, came to light last year. And though he admitted to affair in March of 2016, he managed to stay in office for another year - until today, when his impeachment hearings were schedule to begin, but instead ended in his sudden resignation.

However, ending the impeachment hearings early didn’t get him out free: According to the AP, he was charged with two counts of breaking state campaign laws on Monday (failure to disclose a statement of economic interests and file campaign disclosures.) Both are misdemeanors. He was booked into the county jail, according to CNN.

If you don’t live in Alabama - or aren’t yet familiar with the details of messy allegations that eventually forced Bentley out of office, catch up here.

Why did he resign?
Not only did Bentley have an affair with a staffer, Mason, he also allegedly took advantage of his position as governor to both cover up the affair and offer unearned benefits to Mason.

It all began last year, after Bentley fired Spencer Collier, former head of the Alabama Law Enforcement Agency, who then went to AL.com and said the governor was having an affair with Mason. Collier’s allegations were all but proved when a 2014 recording of Bentley making sexually-charged comments to Mason was released the very next day. Here are a few of the most damning lines from the recording, both uttered by Bentley.

“Baby, let me know what I am going to do when I start locking the door. If we are going to do what we did the other day, we are going to have to start locking the door.”

“You know I just, I worry about sometimes I love so you much. I worry about loving you so much.”

And it gets juicier: The recording was made by Bentley’s wife, Dianne, who filed for divorce the year before. The Washington Post reports that she made the recording in order to catch any infidelity on her husband’s part.

Bentley fessed up, kind of. “I love many members of my staff, in fact, all the members of my staff. Do I love some more than others, absolutely.”

“At times in the past, have I said things that I should not have said? Absolutely,” he said at a March 2016 news conference, according to the New York Times. “That’s what I’m saying today.”

Mason resigned from her role in the governor’s mansion shortly after.

FROM COINAGE: This Is How Much It Would Cost to Paint the White House (And More Crazy Facts)

What about those texts?
Dianne Bentley, Bentley’s ex-wife, turned over her iPad to the investigative committee - which, since it was connected to her husband’s state-issued iPhone, had records of lots of texts exchanged between Bentley and Mason. More nauseatingly-sweet than nasty, the texts are a lot of “I love you Rebekah,” “I love you Robert,” “I am forever yours,” “You wonderful sweet man” and more romance-heavy messages.

But the real kicker is one “I love you Rebekah” - which Bentley accidentally sent to Dianne. He then realized his error, followed up with a “I love you Dianne,” to which she responded “Thanks for putting my name in.”

Robert Bentley and Rebekah Mason
Robert Bentley and Rebekah Mason

What happened next?
Calls for impeachment started the next month, which Bentley said he would fight.

He managed to make it through the rest of the year in the governor’s mansion, but he was in a state of limbo. The state’s attorney general, Luther Strange was reportedly considering an investigation into the affair, but then Bentley appointed Strange to replace Jeff Sessions in the Senate after President Trump appointed him to the Attorney General spot.

But in March, things went south, fast. The Alabama Ethics Committee said that Bentley might have broken state laws in his attempts to cover up his affair. And then the House Judiciary Committee’s attorney released a whooping 3,000 page report filled with bombshells - from the salacious (answering his hotel room door in his underwear, thinking it was Mason on the other side, when it was actually fellow staffers) ones that seemed to indicate some wrongdoing, like threatening his wife’s staffer who helped her compile the recordings, and trying to get Alabama law enforcement aid in covering up the affair.

“Governor Bentley directed law enforcement to advance his personal interests and, in a process characterized by increasing obsession and paranoia, subjected career law enforcement officers to tasks intended to protect his reputation,” the report reads.

How about the legal troubles?
The alleged law breaking was the most revealing part of the report, and likely what got the state’s Supreme Court to overturn a district court’s block on any potential impeachment proceedings. They alleged that Bentley used state resources to hide his relationship with mason. This includes helping pay Mason’s legal fees with the use of campaign funds, according to The Washington Post, and coercing government employees into assisting in the coverup of his affair.

Back in March 2016, he denied any illegal activity, saying “I can assure the people of Alabama that, as their governor, I have never done anything illegal,” according to the New York Times.

How far did they get in the impeachment hearings?
Not very. The hearings began today in the Alabama House, and within a few hours, an anonymous source confirmed that he planned to resign, according to The Washington Post.

That same day, Bentley was booked into the Montgomery County Jail for the two misdemeanor charges.

And his wife?
The former Mrs. Bentley, Dianne, filed for divorce in 2015 after 50 years of marriage, and the couple was granted said divorce in September of that same year. The records from their divorce were sealed by the court.

This article was originally published on PEOPLE.com