(CNN) Gov. Robert Bentley's resignation came Monday, a much-expected if long-delayed climax to a saga that had dogged him and Alabama for years.

It began with Bentley's alleged dalliances with political adviser Rebekah Caldwell Mason, but over the years it turned into a maelstrom, sucking in everything around it: the state's top cop, the state attorney general's office, a US Senate seat, multiple prosecutors, the Legislature and the Alabama Ethics Commission.

Ultimately, as special counsel Jack Sharman outlined a string of salacious allegations before a state House Judiciary Committee resolved to impeach the second-term governor, Bentley cut a deal with prosecutors and stepped down.

Shortly after he pleaded guilty to two misdemeanors and was booked into Montgomery County Jail, he announced he would resign within an hour and never seek public office again. The plea deal also states he will waive all retirement benefits, perform 100 hours of community service in his capacity as a medical doctor and surrender more than $50,000 in fines, reimbursements and campaign funds.

Bentley is the third ex-Alabama governor to be convicted of criminal charges since the 1990s, following in the steps of Don Siegelman and Guy Hunt, both of whom were imprisoned on charges related to corruption in office.

Thank you, Alabama. From the bottom of my heart. God Bless our Great State. pic.twitter.com/6vxQ5tlkRo — Dr. Robert Bentley (@GovernorBentley) April 10, 2017

"I have decided it is time for me to step down as governor," Bentley said. "I've not always made the right choices. I've not always said the right things. Though I have sometimes failed, I've always tried to live up to the high expectations the people place on the person who holds this esteemed office."

Lt. Gov. Kay Ivey was sworn in Monday night as the 54th governor of Alabama.

"Today is a dark day in Alabama, but also it's one of opportunity," she said during her swearing-in ceremony. "I ask for your help and your patience as together we steady the ship and improve Alabama's image."

On Tuesday, Ivey asked for the resignations of all staffers and cabinet members, said Ivey's spokeswoman, Eileen Jones. Ivey accepted the resignation of Mason's husband, Jon, director of ServeAlabama , the governor's office of faith-based and volunteer services. It's possible Ivey will not accept some resignations, Jones said.

Long time coming?

Rumors had swirled for weeks, months even, that Bentley -- aka the "Luv Guv" in local journalistic parlance -- wouldn't make it through spring. But until Monday, the Republican governor had stood firm. He had not engaged in an extramarital affair, he promised. He hadn't betrayed taxpayers' trust by misusing state resources, he said.

He defied repeated calls , including one from his own party, to step down. His only error, he said again and again, was making inappropriate remarks to a staffer. He would never step down, he proclaimed -- perhaps not a surprise for a man who said he been tapped by God to lead the Yellowhammer State.

But to say the writing was on the wall would be an understatement.

Lawmakers introduced articles of impeachment last year, and despite Bentley's legal team attempting to delay the proceedings, they kicked off as planned with the Alabama Supreme Court's blessing on Monday. Sharman spent part of the morning presenting to the House committee communications between Bentley and the married Mason. In one text, the governor accidentally sent a message meant for Mason to his wife of 50 years.

Dianne Bentley saw her divorce from the governor made final last year, but only after she surreptitiously recorded her husband telling Mason he loved her and enjoyed putting his hands under her shirt.

At one point, Robert Bentley is heard suggesting, "If we're going to do what we did the other day, we're going to have to start locking the door."

Mason resigned last year.

'People bow to his throne'

JUST WATCHED Accusations mounting against Bentley Replay More Videos ... MUST WATCH Accusations mounting against Bentley 02:11

But this scandal was about much more than allegations of an affair. Indeed, Bentley pleaded guilty to failing to file a major contribution report and knowingly converting campaign contributions to personal use.

His detractors will say that is the least of what he did, and they point to a pattern of behavior they say was aimed wholly at facilitating an affair, keeping it secret and punishing anyone who threatened to make it public.

among staffers. His report paints a portrait of a dysfunctional executive branch headed by a Nixonian governor whose "loyalty shifted from the State of Alabama to himself." According to Sharman's investigative report , filed last week, Bentley was desperate to keep the allegations from spreading beyond the Governor's Mansion, where they were apparently well-knownamong staffers. His report paints a portrait of a dysfunctional executive branch headed by a Nixonian governor whose "loyalty shifted from the State of Alabama to himself."

Robert Bentley was booked in to Montgomery County Jail on Monday.

Among the allegations, as Sharman told the House committee Monday, was that Bentley angrily confronted Heather Hannah, a staff member to Bentley's wife, twice at the Governor's Mansion.

Hannah testified that Bentley, upset because he believed she had helped his wife record the incriminating remarks he made to Mason, told Hannah to watch herself and warned her he was the governor and "people bow to his throne."

In what his accusers say was another attempt to cover up the relationship, Bentley also fired Spencer Collier, the secretary of the Alabama Law Enforcement Agency.

Formerly the state's top cop, Collier said he was terminated for disobeying Bentley's order that he not cooperate with the attorney general's investigation of House Speaker Mike Hubbard. (Hubbard was sentenced to prison last year after being found guilty on 12 ethics charges .)

After his dismissal, Collier sat down with reporters and told them he'd seen proof of Bentley's affair and accused the governor of using state resources to hide it.

Domino effect

JUST WATCHED Alabama governor's resignation speech Replay More Videos ... MUST WATCH Alabama governor's resignation speech 06:32

The House committee's investigation into the governor's misdeeds came to a halt in November when then-state Attorney General Luther Strange asked that his office be able to take over "related work."

But in February, before the attorney general office's investigation was done , Bentley appointed Strange to the US Senate seat vacated by Jeff Sessions, whom President Donald Trump had nominated to become attorney general of the United States.

AL Sen. Minority Leader Quinton Ross says lawmakers are looking forward to moving the state in a positive direction under Gov. Ivey. pic.twitter.com/SwTMYvOGkZ — Kristen Holmes (@KristenhCNN) April 11, 2017

The governor then picked Steve Marshall to fill Strange's seat, and Marshall earlier this year recused himself from the Bentley investigation and named retired Montgomery County District Attorney Ellen Brooks as acting attorney general in the Bentley investigation.

Last week the state Ethics Commission said it "found probable cause to believe" Bentley violated the Alabama Ethics Act and Fair Campaign Practices Act and recommended leveling felony charges against the governor . The commission referred the case to Daryl Bailey, the Montgomery County district attorney whom Bentley had tapped to replace Brooks when she retired.

AL Rep. Jimmy Martin says Bentley made rights decision with plea deal and resignation. Describes mood among colleagues as "up" pic.twitter.com/fFS0rYk2Bb — Kristen Holmes (@KristenhCNN) April 11, 2017

As impeachment proceedings got underway, Bailey referred the case to his old boss , Brooks, and said he wasn't recusing himself, but rather, ensuring that he didn't duplicate or interfere with Brooks' probe.

Within hours, Brooks would announce Bentley had pleaded down to misdemeanors.