For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

In an upset, Democrat Andy Beshear has knocked off Kentucky’s Republican Gov. Matt Bevin.

Over his four years in office, Bevin developed a persona as the Trumpiest governor in the country. And for a time, that may have seemed like smart politics in a state exceedingly friendly to Republicans—one where President Trump won by 30 percent in 2016, and where Republicans control both arms of the state legislature. But he ended up in a tight race thanks to a political styling that has Bevin consistently ranked as one of the least popular governors in the country. He’s spent the past several years in office name-calling his political opponents, particularly singling out the state’s public school teachers for scorn. And while that bombastic style has won the support of Trump conservatives nationally, it turns out even Republican voters aren’t always thrilled to have a politician at home who picks petty fights to distract from his political troubles.

Bevin went out of his way to try and nationalize the race, and Trump himself came to Lexington for an election eve rally. “If you lose,” Trump said, “it sends a really bad message…you can’t let that happen to me.”

As I explained for Mother Jones‘ September/October issue, Bevin united opposition by calling out the state’s teachers after they protested his proposal to rollback benefits in the state’s pensions:

Last year, when teachers held a sick-out to protest Bevin’s proposed pension cuts, the governor unleashed an unhinged rant. “Here’s what’s crazy to me,” he told a reporter. “I guarantee you somewhere in Kentucky today a child was sexually assaulted that was left at home because there was nobody there to watch them.” (Republicans in the state House passed a resolution condemning Bevin’s comments, which he later apologized for.) In April, Bevin said that teachers taking a sick-out day to protest his pension proposals had led to a child being shot: “One thing you almost didn’t hear anything about while we had people pretending to be sick when they weren’t sick and leaving kids unattended to or in situations that they should not have been in—a little girl was shot, 7 years old, by another kid.” (Beshear tweeted in response: “Despicable. Matt Bevin is unfit to govern. Kentucky families, teachers, and kids deserve so much better than this governor.”) And Bevin has compared teachers and other public employees concerned about his pension plan to drowning victims. “They’re fighting you, biting you, pulling you under,” he said. “You just need to knock them out and drag them to shore.” “This governor just keeps opening his mouth and putting his foot in it,” says Stephanie Winkler, a fourth grade teacher from Madison County who recently concluded her term as president of the Kentucky Education Association (KEA), a powerful advocacy group for educators that has tangled with Bevin. “And it’s on the minds of people. Anybody that works in a public school.”

Bevin’s removal from office will have immediate, real-world implications. The Republican governor staked much of his campaign on his record of rolling back reproductive rights—even tweeting out that message an hour before polls closed Tuesday.

Thanks to laws signed by Bevin, Kentucky was down to just one abortion provider, EMW Women’s Surgical Center in Louisville, which has been fighting several lawsuits to stay alive. If Bevin had won reelection, the clinic might have been forced to shut down, but it is likely safe under a Beshear regime, and the state could even see other abortion providers open.

Hundred of thousands of Kentuckians will also likely see another immediate change by having their voting rights restored once Beshear takes office. As my colleague Ari Berman recently explained:

In November 2015, shortly before leaving office, Kentucky Gov. Steve Beshear, a Democrat, issued an executive order automatically restoring voting rights for roughly 140,000 people with past felony convictions who had completed their sentences for nonviolent crimes. Republican Matt Bevin, who supported restoring voting rights for ex-offenders while serving in the Kentucky senate, changed his mind after replacing Beshear as governor in December 2015 and rescinded his predecessor’s executive order. As a result, more than 300,000 people with felony convictions can’t vote in Kentucky—9 percent of the population, according to a 2016 study by the Sentencing Project, including more than one in four African Americans, making it the state with the highest black disenfranchisement rate.

The results are also good news for residents who rely on the government for their health insurance. The state saw one of the most dramatic drops in its uninsured rate following the implementation of Obamacare. But Bevin campaigned vehemently against the law when he first ran in 2015, and as governor he has tried to impose work requirements that could kick thousands of Medicaid recipients off their health insurance. Those changes to Medicaid are currently on hold thanks to legal challenges, and it’s unlikely that a Beshear administration will keep that fight going.

Bevin refused to concede the election after all the results came in Tuesday night, and a recount appears likely.

Kentucky Gov. Matt Bevin says he's not conceding as he is narrowly trailing behind Democratic challenger Andy Beshear https://t.co/H9n7JKbYS7 pic.twitter.com/bvYzYakGs2 — CBS News (@CBSNews) November 6, 2019

But with several outlets calling the election for Democrats, Beshear gave a speech declaring victory.