(COLUMBIA, S.C.) — One of Donald Trump’s earliest and strongest supporters, South Carolina Gov. Henry McMaster, survived an unusually tough challenge from a political newcomer on Tuesday, saving Trump from embarrassment by winning a primary contest that tested anew the Republican president’s clout within his own party.

It remained unclear how Trump’s preferred candidates in other marquee races across seven states fared. The hopefuls included a convicted felon the president opposed in his home city and Mitt Romney, the former presidential nominee and one-time face of the “Never Trump” movement in Utah.

Polls had also closed in Oklahoma, Mississippi, Maryland, New York and Colorado. Voting continued in Utah, where Trump had endorsed Romney.

No contest mattered more to Trump than South Carolina, where McMaster had faced the possibility of losing his seat to self-made Republican millionaire John Warren. The White House went all-in for the governor in recent days, dispatching the president and the vice president to the state in an effort to prevent a political debacle.

Trump has a mixed track record when campaigning for other candidates: His preferred candidates have suffered stinging losses in Alabama and western Pennsylvania in recent months.

The South Carolina gubernatorial race headlined the latest series of primary contests across seven states. With the November general election a little more than four months away, more than half the states will have selected their candidates after the day’s final votes are counted.

History suggests that Trump’s Republican Party, like the parties of virtually every first-term president dating back to Ronald Reagan in 1982, will suffer losses this fall. Yet it remains unclear whether Democrats’ enthusiasm advantage demonstrated in the early months of Trump’s presidency will be enough to take control of Congress and key governors’ offices nationwide.

Some of the Democrats who showed up to vote Tuesday were particularly motivated by the president’s policy of separating immigrant children from their parents at the southern border — a policy Trump reversed last week after an avalanche of criticism.

Seventy-year-old Patricia Lane cast a ballot in Bethesda, Maryland, despite months of tiring chemotherapy treatments. She said she was appalled by the family separations and she believed many women and mothers were similarly motivated.

“We’re who they’re afraid of at the ballot box,” Lane said.

Besides South Carolina, the president injected himself into races Tuesday in New York, where convicted felon Michael Grimm was fighting for his old job, and in Utah, where Romney, the 2012 Republican presidential nominee, was seeking a political comeback as a 71-year-old freshman senator.

Trump last month stepped into the messy congressional primary in New York City’s only Republican stronghold, Staten Island, calling for the re-election of Rep. Dan Donovan. Standing in his way: Grimm, who held the seat until 2015, when he pleaded guilty to knowingly hiring immigrants who were in the country illegally to work at his Manhattan restaurant and cooking the books to hide income and evade taxes.

Grimm, who served seven months in prison, was known for his tough-guy talk while in Congress, where he once threatened, on camera, to break a reporter in half “like a boy” and throw him from a balcony.

Elsewhere in New York, a handful of incumbent congressmen from both parties could lose their jobs. They include Rep. Joe Crowley, considered a candidate to become the next House speaker should Democrats win the majority. He faced locked in his first serious Democratic primary in more than a decade.

Political newcomer Alexandria Ocasio-Cortez, a 28-year-old former aide to the late Massachusetts Sen. Ted Kennedy, hoped to take down Crowley. While Crowley was backed by many unions, Ocasio-Cortez was endorsed by several liberal groups, including MoveOn.

More than 2,000 miles (3,200 kilometers) away in deep-red Utah, Trump also endorsed Romney, who once served as the face of the “Never Trump” movement but has since warmed to the Trump presidency.

The former Massachusetts governor faced little-known state Rep. Mike Kennedy, who questioned Romney’s conservative credentials and ability to work well with the president. Kennedy won over far-right conservatives at the state GOP convention earlier in the year, but he was expected to struggle among more moderate Republican voters — including many Trump critics — around the state.

Utah voter Andrew Knaupp, a 43-year-old graphic designer, said he was irritated by Romney’s early hostility to the president.

“I’m left wondering which Mitt Romney I’m going to get in office. He’s changed his positions on a lot of things,” Knaupp said, noting that he voted for Kennedy.

In a weekend op-ed published in The Salt Lake Tribune, Romney wrote that the Trump administration’s policies have exceeded his expectations, but he pledged to “continue to speak out when the president says or does something which is divisive, racist, sexist, anti-immigrant, dishonest or destructive to democratic institutions.”

Not to be forgotten: races to determine gubernatorial candidates in Maryland, Colorado and Oklahoma. Oklahoma was also deciding whether to legalize the cultivation, possession and use of marijuana for medicinal purposes.

In Maryland, the State Board of Elections was contacting as many as 80,000 voters whose registration information had not been updated, the result of a computer problem. Voters affected by the problem were asked to cast provisional ballots, which would not be counted until July 5, officials said. They added that the problem was related to a programming error, not infiltration from an outside source.

The most telling test of Trump’s influence was in South Carolina, where McMaster — elevated to the state’s top office last year when Nikki Haley became U.N. ambassador — had seemed in jeopardy. Two weeks ago, the governor failed to win the GOP primary outright, requiring a runoff election with Warren.

McMaster shocked even his closest advisers when, as lieutenant governor in early 2016, he became the first statewide-elected official in the country to back Trump’s White House bid.

Warren, a millionaire businessman and a Marine, has argued that his outsider candidacy makes him more akin to Trump.

During a rally on the eve of the election, Trump dedicated only a few minutes of his hourlong speech to the Republican governor he was there to support. But McMaster got the image he wanted as he embraced Trump while they briefly shared the stage.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.