Missouri, Kansas, Michigan and Washington held primary elections on Tuesday alongside a special election in Ohio, in what was being watched as a test of Donald Trump’s popularity among Republican voters less than 100 days before the November midterm election.

Victories for Gretchen Whitmer in Michigan and Laura Kelly in Kansas meant female candidates set a new record, with 11 women having now been chosen as their party’s nominees for governor, surpassing the previous high-water mark of 10 in 1994, according to the Center for American Women and Politics.

At least 173 female major party nominees will also run for the House, beating the record of 167 from 2016.

One of the most closely watched races of the night was the Kansas Republican gubernatorial primary, the result of which was too close to call early on Wednesday.

The contest pits Jeff Colyer, who has led the state since Sam Brownback resigned to accept an ambassadorship under Trump, against Kris Kobach, the secretary of state and the face of Trump’s controversial voter fraud panel. Trump endorsed Kobach over the objection of state Republican leaders who worry that nominating a lightning-rod figure will give Democrats an opening.

On Wednesday, Trump boasted about his endorsement record, tweeting: “5 for 5!”

The winner of that primary will faceKelly, a state senator, who clinched the Democratic nomination.

In Michigan’s Democratic gubernatorial primary, Whitmer, a former state senate leader, soared past Abdul El-Sayed, the former Detroit health commissioner endorsed by Bernie Sanders, and Shri Thanedar, a chemical-testing entrepreneur.

With her nomination, Whitmer could help lead an all-female statewide ticket for the Democratic party when she faces Bill Schuette, the state’s Republican attorney general and an ally of the president, in the November general election.

Though Michigan gave Trump one of his most shocking wins on election night in 2016, Democrats are optimistic about their chances in the state. After eight years in office, the term-limited governor, Rick Snyder, leaves with low approval ratings in the wake of the Flint water crisis.

Michigan Republicans chose John James, a business executive and US army veteran, to challenge the Democratic senator Debbie Stabenow, who has held the seat since 2000. James, one of the few African American Republicans running in major races this cycle, earned an all-caps Twitter endorsement from the president which may have fueled his underdog campaign.

Congratulations to a future STAR of the Republican Party, future Senator John James. A big and bold victory tonight in the Great State of Michigan - the first of many. November can’t come fast enough! — Donald J. Trump (@realDonaldTrump) August 8, 2018

In Michigan’s eighth district, Elissa Slotkin, a former top defense official in the Obama administration, has the chance to unseat the Republican congressman Mike Bishop in November. The nonpartisan Cook Political Report recently shifted the race for the seat in Detroit’s suburbs from “leans Republican” to “toss up”.

Tuesday night was a disappointment for the Democratic progressive insurgency. Sanders and Alexandria Ocasio-Cortez had travelled to Michigan and Kansas in support of candidates who shared the platform of Medicare for All and $15 federal minimum wage, arguing that a liberal agenda that worked in the Bronx could work in “red states”.

In Michigan, El-Sayed, whom Sanders campaigned for last weekend, was easily defeated in every county. In Kansas, where Sanders and Ocasio-Cortez hoped their support would lift the labor lawyer Brent Welder in a crowded, competitive primary, voters instead chose the former MMA fighter Sharice Davids, who, if elected, would be the first Native American woman in Congress and one of only a few openly LGBT members.

James Thompson, an Army veteran and civil rights attorney running for Congress in Kansas’ fourth congressional district, was the only candidate they endorsed to advance on Tuesday. He was widely expected to win and will face Republican incumbent Ron Estes.

In Missouri, Senator Claire McCaskill, viewed as one of the most vulnerable Democrats in the chamber, will face the attorney general, Josh Hawley, whom Trump backed when he was in the state touting the Republican tax plan. Trump won the state by 20 percentage points and McCaskill is believed to have won her re-election race six years ago in part because of her weak Republican opponent, Todd Akin, who said victims of “legitimate rape” rarely got pregnant.

In Missouri, Bob McCulloch, a seven-term prosecutor who led the investigation into the fatal police shooting of Michael Brown in Ferguson, lost the Democratic primary to the reformist city council member Wesley Bell in a stunning upset. No Republicans were on the ballot, making Bell all but certain to win in November.

But much of the national spotlight was trained on Ohio, where a competitive special election in a traditionally Republican district that Trump won handily became yet another sign of Democratic strength ahead of the 2018 midterms.

“With twice as many registered Republicans as Democrats, this district should have been a slam dunk for the GOP,” said the congressman Ben Ray Luján, chairman of the Democratic Congressional Campaign Committee. “The fact that we are still counting ballots is an ominous sign for their prospects in November.”

Meanwhile, Missouri voters soundly rejected a “right-to-work” law that would have undermined labor organizing in the state, delivering a major victory to unions, whose power has been greatly undermined by the supreme court and Republican-controlled state legislatures.

The “right-to-work” legislation was passed by Missouri’s Republican-led legislature and signed into law by the state’s then Republican governor in February 2017. But it never went into effect because labor organizations collected more than 300,000 signatures, far exceeding the number required to force a referendum.

“Today we sent a clear message to any politician, CEO, or dark money donor who wants to silence working people,” the Missouri AFL-CIO president, Mike Louis, said after the vote was called. “We will stand together and yell louder than ever before because our families depend upon us.”

Supporters of “right-to-work” laws say employees should not be compelled to pay union fees when they are hired. The “fair-share” fees paid by non-union members are less than full union dues and are intended to cover collective bargaining costs. Earlier this year, the supreme court ruled that public-sector workers were not obligated to pay union dues.