The ongoing public feud between President Donald Trump and Senate Majority Leader Mitch McConnell (R-KY) threatens to spill over onto the 2018 elections, leaving Republicans with a series of nasty primaries that could hurt them in races across the country and damage their slim majority.

Trump is going full berserker on McConnell following the Kentucky Republican’s relatively muted Monday criticism that the president held “excessive expectations about how quickly things happen in the democratic process” and was hurting Republicans by setting artificial deadlines. Trump’s response has been to lash out with attacks on McConnell’s capabilities as leader and hint that he might ask McConnell to step down if he doesn’t speed up his work.

Can you believe that Mitch McConnell, who has screamed Repeal & Replace for 7 years, couldn't get it done. Must Repeal & Replace ObamaCare! — Donald J. Trump (@realDonaldTrump) August 10, 2017

Mitch, get back to work and put Repeal & Replace, Tax Reform & Cuts and a great Infrastructure Bill on my desk for signing. You can do it! — Donald J. Trump (@realDonaldTrump) August 10, 2017

After a tense Thursday morning phone call to McConnell and a series of furious tweets, Trump told reporters Thursday afternoon that it was “a disgrace” that McConnell had failed to push Obamacare repeal through the Senate. He warned if the Senate can’t pass that legislation, tax reform and infrastructure soon, reporters “can ask me that question” of whether he’d want the Senate majority leader to step down.

McConnell seems to be looking to deescalate the fight. He’s been radio silent since Monday, and his office directed TPM to the National Republican Senatorial Committee (NRSC), which did not respond to calls and emails.

McConnell isn’t going anywhere anytime soon — he has strong support from his own conference. But the public spat with Trump threatens the size of his majority, complicating the elections of both incumbents and challengers as well as dividing an unhappy donor class. And the more they fight, the worse Republican strategists say things will go for the party next fall.

“Everybody knows we are going to have a tough cycle in the best of circumstances in 2018, the political winds are in your face when you’re the party in power,” said Republican strategist Rob Jesmer. “If [Trump] thinks the solution is to get his voters so mad that they stay home that could be a gigantic problem. Does he think this is going to be easier with oversight committees controlled by Democrats? That’d be an unmitigated disaster for us.”

When he worked at the NRSC in 2010 and 2012, Jesmer saw the party blow winnable races in a number of states because fatally flawed candidates won brutal primaries. While establishment outside groups and the NRSC’s decision to fight hard for its favorites in primaries have kept that from happening the last two election cycles, putting them in the majority, they’ve never faced a president of their own party undercutting their efforts.

“It’s in everyone’s interest to work together, including the president’s,” Jesmer said. “When he’s attacking members, all he’s doing is hurting himself in the long run. He’s not doing himself any favors at all.”

A friendly map likely insulates McConnell from a true threat to the majority — 10 Democrats in states Trump won face reelection, compared to only one Republican from a state he lost. But Democrats are starting to buzz that they might be able to fight the GOP to a draw, and even potentially gain a seat or two, though even the most optimistic say the majority is likely still out of reach.

Sens. Jeff Flake (R-AZ) and Dean Heller (R-NV), by far the two most vulnerable Republicans facing reelection next fall, are both facing threats from the populist right by candidates who’ve slammed them for not showing enough loyalty to Trump. Flake has been particularly outspoken against Trump, penning a book and op-ed flaying the president, and Trump and his allies have responded with fury.

The president has privately threatened to spend $10 million to defeat Flake. While that’s likely bluster, White House aides have met with former state Treasurer Jeff DeWit and former state GOP Chairman Robert Graham, both top Trump surrogates, to discuss primary challenges. They’ve also gotten together with Flake’s fringe-favorite primary opponent, former state Sen. Kelli Ward (R). One of Trump’s top donors, billionaire Robert Mercer, just cut a $300,000 check to Ward’s super-PAC this week (he spent even more to help Ward in her failed effort to beat Sen. John McCain (R-AZ) last cycle).

Heller, on the other hand, has awkwardly danced all over the place on Trump and his top priorities, trying to please everyone and infuriating voters left and right in the process. After saying he wouldn’t back the Obamacare repeal bill crafted by McConnell and demanded by Trump, Heller voted to move forward on that legislation, irritating just about everyone in his home state. Earlier this week, businessman Danny Tarkanian, who has run (and lost) many races in the state before, launched a bid against Heller, slamming him for not carrying more of the president’s water.

Both senators are still favorites to win their primaries — and both the NRSC and the Senate Leadership Fund, a well-funded super-PAC run by former McConnell staffers, are ready to go to war for them. But divisive, nasty primaries could wound them both as they head into already-tough general elections. Trump allies say he’s at least as angry at the pair as the Democrats who have so far thwarted his legislative agenda.

“The president spotlighting Heller and Flake is an example of why he came here to Washington, D.C.: To disrupt the status quo. He sees a culture of empty promises,” a strategist close to the White House told TPM. “He gets frustrated when he sees Republicans who have benefited from these promises break those promises. … The president’s going to hold them accountable.”

It remains unclear whether this is a temporary tantrum from Trump, a la his primary attacks against Ted Cruz and Marco Rubio, or whether he’ll follow through on his threats. Shortly before he went on his McConnell meltdown, Trump tweeted his support for Sen. Luther Strange (R-AL) in his hard-fought primary, giving a big boost to McConnell’s preferred candidate against two challengers. Republicans warn that Roy Moore, one of his opponents, could actually put the seat at risk if he wins the primary.

But the mercurial and unpredictable president is hurting in a lot more ways than he’s helping, and GOP strategists are pulling their hair out.

“If you’re someone who’s trying to expand the majority, you do that by defeating Democrats, not Republicans. It’s a pretty simple concept,” griped one top Senate Republican strategist. “We were one vote short of repealing Obamacare in the Senate last month. The best way to increase the number of votes is to increase the number of seats.”