Minnesota Republicans decisively rejected the comeback bid of former governor Tim Pawlenty, a onetime kingmaker in state politics who proved unable to overcome his 2016 description of Donald Trump as “unhinged and unfit” for once boasting of grabbing women.

The surprise result on Tuesday was just the latest evidence of the president’s rising control over the Republican Party electorate and the waning power of veteran lawmakers, coming just a week after Trump’s endorsement helped Kansas Secretary of State Kris Kobach topple incumbent Gov. Jeff Colyer, who conceded the race Tuesday.

After acknowledging his defeat at a campaign rally Tuesday and throwing his support behind Jeff Johnson, Pawlenty spoke briefly with reporters.

“The Republican Party has shifted,” he said, according to a reporter for the Minneapolis Star Tribune, who was in attendance. “It is the era of Trump, and I’m just not a Trump-like politician.”

In both cases, however, political observers said wins for the Trump movement in the summer would make it harder for Republicans to win the general election against Democrats in the fall.

A twice-elected governor, former presidential candidate and banking lobbyist, Pawlenty lost decisively to Johnson, a commissioner of Hennepin County. Pawlenty’s defeat came after he and his allies outspent Johnson by a margin of roughly 3 to 1, according to a Democratic consultant tracking the spending. When Trump visited Duluth for a political rally, Pawlenty decided not to attend.

“Tim Pawlenty stuck his finger in the wind,” Johnson said in his closing ad, which condemned Pawlenty’s criticism of Trump after the release of the “Access Hollywood” tape in October 2016. “I won’t panic when it matters most.”

Christine Hallquist of Vermont became the first openly transgender candidate to win a major political party's nomination for governor on Aug. 14. (Amber Ferguson/The Washington Post)

The result also highlighted the challenge for Republicans in the fall in the upper Midwest as they try to navigate rising Democratic revulsion with Trump and their own party’s deepening devotion to the president.

The difficulty has been evident for months in neighboring Wisconsin, where Gov. Scott Walker, who won his party’s nomination again Tuesday, has been repositioning his policies and sounding the alarm about a potential “blue wave,” which has already swamped Republicans in local special elections in his home state.

Walker will face Democratic state schools Superintendent Tony Evers, who has made Walker’s cutting of school funding early in his term a centerpiece of the campaign.

With just 84 days before the general election, primary voters cast ballots in four states Tuesday to choose candidates for governor and other state offices, amid heated campaigns for the U.S. House and Senate.

As Republicans doubled down on their commitment to Trump, Democrats continued their pattern of nominating glass ceiling breakers by selecting a transgender woman as their candidate for governor in Vermont, a black woman for a U.S. House seat in Connecticut and a Muslim woman for another congressional seat in Minnesota.

If elected in November, Christine Hallquist, a former utility company executive, would be the first transgender governor of any state, and Jahana Hayes, a former national teacher of the year, would be the first black woman to represent New England in the House. Ilhan Omar, a Somali American in Minnesota, is now positioned to be one of two Muslim women elected to the House in the fall, along with Rashida Tlaib, who was nominated for a Democratic-leaning seat in Michigan last week.

Hallquist will face Gov. Phil Scott, a popular incumbent in the Democratic-leaning state. Hayes, who was endorsed by liberals including New York City congressional candidate Alexandria Ocasio-Cortez and Sen. Chris Murphy (D-Conn.), is strongly favored in a district Clinton won by five points in 2016.

In Wisconsin, a Democratic contest for the seat of retiring House Speaker Paul D. Ryan (R) has been rocked by claims by candidate Cathy Myers, a grass-roots activist, that the arrest record of her rival, Randy Bryce, will prevent him from winning in November. But Bryce easily won.

Bryce, an early Democratic fundraising phenom, said the arrests in the 1990s, related to a drunken driving conviction and a marijuana possession charge, were learning experiences. (He also was arrested more recently while protesting Republican policies.)

“I’ve worked very hard to learn from my mistakes so I can be a man my son can be proud of,” he said in a statement in response to the resurfacing of the old charges.

He will face Bryan Steil, a Ryan-endorsed lawyer, who ran against a self-described “pro-white” nationalist candidate, Paul Nehlen, who was banned from Twitter after sending a racist message targeting American actress Meghan Markle before her marriage to Britain’s Prince Harry. Nehlen received more than 6,500 votes, or about 11 percent of the GOP turnout.

Democrats faced another controversy in Minnesota, where allegations of abuse shadowed the vice chair of the Democratic Party, Rep. Keith Ellison, as he successfully sought his party’s nomination for attorney general.

The allegations of physical and emotional abuse were publicized in recent days by the children of an ex-girlfriend, Karen Monahan, who released text messages alleged to have come from Ellison and claimed he verbally abused her and once dragged her from a bed.

Over the weekend, Ellison, who was favored over four Democratic opponents, released a statement denying the claims. “Karen and I were in a long-term relationship which ended in 2016,” he wrote in the statement, “and I still care deeply for her well-being.”

Morgan Long, a 31-year-old Democrat from Richfield, Minn., said outside a polling station in north Minneapolis the allegations against Ellison prompted her to “stop and take a look at who he is as a candidate.” “It’s coming down to the wire,” she said. “I’m still evaluating everything, and I want to make the most educated decision as possible.”

But Long, who works in human resources for a software consulting firm, said she would probably vote for Ellison because of his record on progressive issues.

“There has to be investigations involved. I’m about facts,” she said.

The political left in Minnesota has been hit hard by the challenge of sorting through claims of sexual harassment, which became a major political issue when a tape surfaced in 2016 of Trump boasting about assaulting women.

Former senator Al Franken, a liberal Democratic icon in the state, resigned eight months ago after several women alleged he had behaved inappropriately and one revealed a photo of Franken, then a comedian, pretending to grab at her breasts in an apparent attempt at humor. Months earlier, Garrison Keillor, the former star of Minnesota Public Radio’s “Prairie Home Companion,” was fired after a woman came forward to allege harassment by him.

By far the most expensive race of the day was a Republican contest in Wisconsin for the chance to challenge Sen. Tammy Baldwin, a Democrat who is favored to win reelection. State Sen. Leah Vukmir, a local party favorite, prevailed over Kevin Nicholson, a self-styled outsider and former Democratic activist backed by the most generous billionaire in conservative politics.

The Wisconsin Senate race has attracted nearly $29 million in spending on advertising, according to a Democratic media buyer, including about $8 million in support of Nicholson from groups that have been backed by conservative businessman Richard Uihlein of Illinois.

Some of those ads tried to paint Vukmir as insufficiently supportive of Trump — she called him “offensive to everyone” during the Republican primaries in 2016. She later endorsed his campaign and supported him over Hillary Clinton.

In tweets Wednesday morning, Trump congratulated several GOP winners, including Vukmir, to whom he offered his “complete and total Endorsement!”

“You beat a very tough and good competitor and will make a fantastic Senator after winning in November against someone who has done very little,” Trump wrote.

Johnson will face the Democratic nominee for Minnesota’s governor, Rep. Tim Walz, who has already made criticism of Trump a centerpiece of his campaign, all but ensuring the race in Minnesota turns into a sort of referendum on the president.

In Wisconsin, Walker has been trying to avoid such a clear divide. A private July survey by i360, a conservative data firm funded by the political network of Charles and David Koch, found Trump underwater in Wisconsin, with 50 percent of the state disapproving of his policies, compared with 44 percent who approved.

A day before polls opened, Walker rejected Trump’s call for a boycott of a Wisconsin motorcycle manufacturer, while claiming at the same time he agreed with Trump.

“I don’t want a boycott of Harley-Davidson,” Walker tweeted. “And one of the best ways for that to happen is to do what the President has called for and that is get to no tariffs as soon as possible.”

Trump’s policy in recent months has been to steadily increase tariffs on geopolitical allies and rivals in an effort to gain trade concessions. The rising taxes led Harley-Davidson to announce a shift in its production overseas.

It also served as a reminder of the potential negative impacts of a president who remains in firm control of his party.

“Trump has been very successful in his primary endorsements, but that’s like saying that someone has won the first half of the game,” said Jennifer Duffy, an election handicapper for gubernatorial races at the nonpartisan Cook Political Report. “You have to win both halves to win the game.”

David Weigel and John Wagner in Washington and Torey Van Oot in Minneapolis contributed to this report.