Democrats very nearly won an Ohio House special election they had no business winning, so they are, you might say, winners and losers all at once in the August 7 elections.

The Ohio 12th Congressional District had been red for 35 years, but Democrat Danny O’Connor almost won it Tuesday in his race against Republican Troy Balderson. In the end, Balderson appeared to have eked out a 1-point win when almost all the votes were counted Tuesday night.

Elsewhere, progressives came up short in the Michigan Democratic governor’s primary election, and a Muslim woman from near Detroit was elected to replace a now-resigned lawmaker who was accused of sexual misconduct.

The O’Connor showing in the Ohio 12th can still give Democrats hope that the “blue wave” could be real. This is a district that, on its surface, should not be competitive in the first place. It was gerrymandered to protect against it, in fact. Donald Trump won it by 10 points.

If Democrats can (almost) win here, they can win in a lot of places. They need 24 seats to take the House, and they could win some of them in states like Ohio, Michigan, and Kansas.

Winner (and loser): centrist Democrats

Danny O’Connor very nearly won in his bid to repeat Conor Lamb’s Pennsylvania performance earlier this year — and election watchers weren’t quite ready to call the race with provisional and absentee ballots still needing to be counted. But as of press time, it looked like O’Connor was going to fall just a little short.

His campaign was pretty explicitly modeled on Lamb’s. O’Connor distanced himself from Washington Democrats, hit Balderson for Republicans’ proposal to cut Medicare and Social Security, and campaigned on defending Obamacare. He also, like Lamb, said he would not back Nancy Pelosi for speaker.

Who knows how much of O’Connor’s performance is him versus the anti-Trump atmosphere; I talked to voters in the district who seemed more focused on electing someone to oppose the president. But this is still a moral win for the people like O’Connor who argue that the Democratic Party can still be a big tent that spans from centrists like him to democratic socialists like Alexandria Ocasio-Cortez, who is all but assured to win her heavily Democratic district this fall.

For now, a lot of Democratic activists and voters don’t want to worry about the ideological divisions within their party; they just want to win. The challenge will come if Democrats win the House in November and actually need to advance an agenda.

But that is a problem I think most Democrats would be happy to have.

Loser: the left

The left has had a good 2018, don’t get me wrong. But Abdul El-Sayed’s second-place finish in the Michigan Democratic governor’s primary — even after a highly publicized appearance days before the election with superstar Ocasio-Cortez and Sen. Bernie Sanders — wasn’t its best moment.

Meanwhile, down south in Ohio, a moderate Democrat who explicitly rejects lefty priorities like Medicare-for-all, “Abolish ICE,” and tuition-free college, very nearly won a House district Republicans have held for 35 years. Progressives have made gains this year, compared to the past, but the moderate message still seems to have a place in certain areas.

Two establishment-backed candidates also beat self-styled Berniecrats in Michigan House primaries. The Kansas Second, with former Bernie Sanders staffer Brent Welder facing Sharice Davids, is too close to call, though Davids appears to be ahead.

Right now, it’s easy to imagine a House Freedom Caucus-size lefty caucus if things break right for Democrats. But that kind of support for the democratic socialist policies can have only so much effect, unless progressives start breaking through in more primaries.

Winner: Labor

In deep-red Missouri, voters resoundingly rejected a right-to-work law for the state. The state legislature had passed a such law, but primary voters blocked it by a two-to-one margin on Tuesday. This was on the same night as the special election in Ohio, where voters also rejected a GOP-passed right-to-work law a few years ago.

Winner: Donald Trump

Trump flew out to Ohio to campaign for Balderson at the last minute and tweeted his support several times. Given the narrow margin of victory, the president can (and quickly did) call it a win for him — though it was closer than it should have been, and that was also probably thanks to him.

When I decided to go to Ohio for Troy Balderson, he was down in early voting 64 to 36. That was not good. After my speech on Saturday night, there was a big turn for the better. Now Troy wins a great victory during a very tough time of the year for voting. He will win BIG in Nov. — Donald J. Trump (@realDonaldTrump) August 8, 2018

Balderson hugged close to the president, favoring culture wars over the tax law in his campaign as Vox’s Tara Golshan reported, and it was just barely enough for him to win.

Winner: Michigan Democratic women

Gretchen Whitmer beat two male candidates in the Michigan Democratic governor’s primary. Women also prevailed in Michigan Seventh and Eighth Democratic primaries. In the 11th district’s crowded primary, Haley Stevens, who got a last-minute endorsement from Hillary Clinton, is holding onto a very small lead.

And after longtime Rep. John Conyers was forced to resign over sexual misconduct allegations, and thanks to a strange state election law quirk, both a black women and a Muslim woman were elected to replace him in an oddball election split.

In the regular Democratic primary election, Rashida Tlaib narrowly edged out Brenda Jones, the Detroit City Council president, in the Michigan 13th’s special and regular Democratic primary elections to replace him on Tuesday. But in the special election, to complete the rest of Conyers’s current term, Jones won. Tlaib will therefore not take office until January, while Jones will serve for a few months after an expected win in the general later this year.

They both beat Ian Conyers, a state senator and the outgoing Conyers’s great-nephew. So by proxy, the Conyers family loses.