Gov. Matt Bevin (R) lost his re-election race in Kentucky on Tuesday, much to the chagrin of President Trump, who won the state by roughly 30 points in 2016 and who had endorsed Bevin only reluctantly, on the eve of the election. Trump and Bevin appeared together in Lexington on Monday at a last-minute rally from which Bevin sought a much-needed boost from a constituency that probably doesn't exist in his home state: Democratic moderates who voted for the president in 2016.

Thank goodness Bevin’s opponent, Andy Beshear, is much cleverer than the CNN anchor who described his victory as a "Beto coup," referring to the avocado poop-dispensing skateboard enthusiast who has failed miserably in both of the elections he has participated in over the last two years. Unlike Beto, Beshear acually won on Tuesday, in large part because he performed better in the northern suburbs outside Cincinnati than his predecessor, Jack Conway, did four years ago. This could be a reflection of Trump’s unpopularity in major metropolitan areas; it could also be an indictment of Bevin’s right-wing economic views. Probably it is both. It does not help Bevin that the population of rural Kentucky is declining both proportionally and in absolute terms in relation to both cities and suburbs. Bevin’s attempt to undermine the Obama-era extension of Medicaid — with a costly and pointless work requirement that no one in particular seems interested in administering — is stalled in federal court and doesn't seem to have done him any favors.

Beshear’s margin of victory is reasonably impressive (though it is smaller than the share of the vote taken by the Libertarian candidate John Hicks), but looks absolutely stunning set alongside the double-digit defeats of nearly every other Democrat running for statewide office in Kentucky on Tuesday. It was more than enough. Mitch McConnell, whom Bevin quixotically challenged in a Senate primary years ago and whose protege Daniel Cameron was elected attorney general by 15 points, probably isn’t quaking in his boots. But he cannot be heartened by the result either.

Until now Trump has largely dominated midterm elections in which he has offered endorsements — including in states in which the polls suggest his candidates of choice did not have good chances, as in last year’s gubernatorial race in Florida, where the Republican Ron DeSantis pulled off an upset against the insurgent populist Democrat Andrew Gillum. It is hard to think that Trump is not wishing he had sat this one out, not only because the value of any endorsement depends upon its ability to deliver actual victories but because he had very little to gain in the first place by sticking his neck out for Bevin, one of the least popular governors in the country and a thorn in the side of his party's leader in the Senate.

Further east in Virginia Democrats gained control of both houses of the state legislature for the first time in a quarter of a century. It is strange to think that even half a decade ago Loudon County was represented in Richmond by the reactionary state senator Dick Black, an enthusiastic supporter of the Lion of Damascus among other causes; the county board of supervisors was home to the eccentric conservative lawyer and activist Eugene Delgaudio.

What does this tell us about next year’s general election? Nothing, I think, very surprising. Wealthy suburbs continue to support moderate candidates who will leave most of the yucky old GOP causes at the door while looking after their retirement accounts; in poor rural areas people continue to vote against their economic interests in the hope of having their worldviews affirmed by rich politicians who live far away. Somewhere in the middle are those pulling the lever for Democrats who in the past have been happy to support generic Republicans. The president's fate next year will depend on whether there are more of these people than there are longtime Democrats willing to support him.

Editor's note: A previous version of this article misstated the location of Trump's Kentucky rally. It has been corrected. We regret the error.