By The Associated Press

MONTGOMERY, Ala. (AP) — Scandal-infused politics dominated Alabama's top news in 2017, with a Senate race that featured allegations of sexual misconduct and allegations of an affair in the governor's office both drawing national attention.

The race for a U.S. Senate seat turned upside down when Republican candidate Roy Moore was confronted with allegations of sexual misconduct involving teenage girls decades ago when he was in the 30s. Moore had been considered the front-runner but ultimately lost to Democrat Doug Jones. With his victory, Jones becomes the first Democrat elected to the Senate from Alabama in a quarter-century. Moore has denied the allegations.

Another who fell from grace in 2017 was Gov. Robert Bentley. He resigned and pleaded guilty to misdemeanor campaign finance charges to avoid impeachment. Kay Ivey took over as governor.

A look at these and other top stories of 2017:

— ALABAMA GOVERNOR — Republican Gov. Robert Bentley staves off an effort to impeach him by resigning and pleading guilty to misdemeanor campaign finance charges. Bentley resigns as lawmakers open an impeachment hearing in the fallout of his alleged affair with a staffer. His resignation comes in a 12-month period that also saw the House speaker convicted on ethics charges and the chief justice removed from his duties by a disciplinary panel for violating standards of judicial ethics.

Kay Ivey takes over as governor. Ivey is Alabama's first Republican female governor.

— INMATE CARE — A federal judge rules Alabama's psychiatric care of state inmates is "horrendously inadequate" and orders improvements.

U.S. District Judge Myron Thompson orders Alabama to overhaul conditions in June after finding that psychiatric care of state inmates is so poor that it violates the U.S. Constitution's ban on cruel and unusual punishment. The Department of Corrections tells the judge in a court filing that it was increasing staff and conducting a comprehensive analysis to determine security staffing needs, and had begun some of those steps before Thompson's ruling.

— THE DEATH PENALTY — Alabama executes three inmates, and a federal appeals court allows a lawsuit over the state's lethal injection method. Meanwhile, state lawmakers approve a bill to end judicial override of jury decisions in capital cases.

— CONFEDERATE MONUMENTS — Gov. Kay Ivey signs a law protecting Confederate monuments. The state sues the city of Birmingham over its decision to build a wooden box to hide a downtown Confederate memorial.

— ABORTION RESTRICTIONS — A federal judge bars Alabama from implementing abortion restrictions. The October ruling by U.S. District Judge Myron Thompson permanently blocks Alabama laws that tried to restrict abortion clinics near schools and to ban a common second-trimester procedure.

— STATEHOUSE CORRUPTION — Former state Rep. Oliver Robinson pleads guilty in a bribery scheme, followed by the indictment of two attorneys and a coal company executive on bribery charges. Once-prominent Alabama lawmaker Micky Hammon pleads guilty to a mail fraud charge for using campaign funds for personal expenses.

— EDUCATION SUPERINTENDENT — Alabama Education Superintendent Michael Sentance resigns after a tumultuous year on the job.

Alabama's Board of Education appoints Ed Richardson interim superintendent in September. Board members are expected to interview finalists for a new state superintendent in the spring of 2018.

— FREE SPEECH BATTLE — Auburn University goes to court in a failed effort to prevent a speech by a prominent white nationalist. Richard Spencer organizes an August white nationalist rally that leads to deadly violence in Charlottesville, Virginia. In Alabama, Auburn University in April denies his request to speak on campus, prompting a federal lawsuit against the university. A judge rules against Auburn, which allows Spencer to speak as planned.

— EX-ALABAMA GOVERNOR — Former Gov. Don Siegelman is released from prison after serving six years for obstruction of justice and bribery. Siegelman and health care executive Richard Scrushy were convicted on federal charges related to contributions Scrushy made to a lottery referendum campaign during Siegelman's 1999-2003 term as governor. Prosecutors said the contributions were effectively a payoff in exchange for Siegelman reappointing Scrushy to a key hospital regulatory board.

Siegelman, who was the last Democrat elected governor in Alabama, has called the case a Republican witch hunt.