It’s Donald Trump’s party now, but Republicans are still struggling with what that means. The primaries weren’t especially kind to insurgent candidates who imitated the president’s brash style — albeit almost uniformly without his humor or marketing flare — or wrapped themselves in the MAGA flag.

That’s not to say Trump didn’t have an outsized influence in the party’s nominating contests this year. He most certainly did, as Ron DeSantis, Brian Kemp and Kris Kobach — the Republican gubernatorial nominees in Florida, Georgia and Kansas, respectively — can all attest. So can soon-to-be former Rep. Mark Sanford of South Carolina.

When Alabama’s Rep. Martha Roby was seen as insufficiently loyal to Trump, she was forced into a primary runoff against a recent former Democrat. After Trump endorsed he, she won that second round of voting easily. In nearly 20 contested primary where Trump took a side, only billionaire Foster Friess, running for the GOP nod for governor of Wyoming, lost. The rest won.

These candidates weren’t always the Trumpiest available, however. He stayed quiet in the Arizona primary to replace retiring Sen. Jeff Flake, letting Rep. Martha McSally beat Trump acolytes former state Sen. Kelli Ward and erstwhile Maricopa County Sheriff Joe Arpaio.  Trump issued an anti-endorsement in West Virginia, telling Republicans not to vote for Don Blankenship of ‘Cocaine Mitch’ fame.

Many of these oddballs exhibited Trump’s vices without possessing any of his virtues. But they are precisely the type of candidates former White House chief strategist Steve Bannon would have embraced in his bid to upend the Republican establishment. The fact that Trump sided with that establishment is among the top reasons the GOP has a shot at retaining the Senate even as control of the House slips away.

Trump’s populism and nationalism are still slowly seeping through the Republican Party. Kobach was a leading immigration restrictionist even before the president was active in politics. But after losing what should have been a safe Senate seat in Alabama, they are increasingly doing it without candidates like Roy Moore.

Still, Trump is a liability to Republicans in many of the races that will decide the composition of the next Congress. The president’s party historically does poorly in the first midterm election. Antipathy toward this president specifically is driving a suburban revolt against Republicans, especially among women and college-educated whites.

That’s why Politico described endangered incumbents like Rep. Dave Brat of Virginia as leading a ‘double life.’ Brat was in many respects Trump before Trump — someone who understood the power of the immigration issue and used it to defeat a party leader in the primary. More exactly, he was a transitional figure in the Tea Party’s shift from constitutionalism and free-market orthodoxy to Trumpian populism.

Elected in a Republican wave year, Brat is for the first time being weighed down by an unpopular president who nevertheless remains beloved by the base. So what does he do? Like Republicans in swing districts under a president as unconventional as George W. Bush, he walks the tightrope.

Republicans want a congressman who will fight alongside Trump. Democrats want Trump impeached and driven from office. Brat has to convince whatever middle still exists that he is serious about governing and delivering results for the district.

It is often a losing battle. The most conservative Democrats were defeated in 1994, 2010 and 2014, powerless to resist electoral rebukes of their president’s party. The most liberal Republicans, including the last of the Rockefellerites in Lincoln Chafee (who was at least good on the Iraq war), were unseated in 2006 and 2008, as hope and change overtook them.

At some point, however, the Republican Party will either integrate Trumpism or it won’t. The Rust Belt, the region that won Trump the White House, is moving back toward the Democrats. Blue-collar turnout has lagged in some special elections. Midterm setbacks are normal. The challenges facing the GOP are less so, with unique Trump-era opportunities to meet them.

W. James Antle III is politics editor of the Washington Examiner and author of Devouring Freedom: Can Big Government Ever Be Stopped?