Senate Foreign Relations Committee Chairman Bob Corker (R-Tenn.) was warned by Senate Majority Leader Mitch McConnell in a private conversation that his comments risked hurting the party’s ability to hold its majority in November’s midterm elections. (J. Scott Applewhite/AP)

Senate Majority Leader Mitch McConnell is scrambling to reassert control over a Republican Party hamstrung by a razor-thin governing majority and riven by increasingly bloody primary fights.

Votes in the Senate on even straightforward measures, such as Thursday’s on the next NASA administrator, have become a struggle, as individual GOP members leverage the absence of Sen. John McCain (R-Ariz.) to pursue other aims.

McConnell had to pull aside rogue senators over their occasional defiance twice in the last two days. He warned one — Bob Corker — in a private conversation that his comments risked hurting the party’s ability to hold its majority in November’s midterm elections.

Outside Washington, McConnell’s allies have launched major ad campaigns against two Republican Senate candidates they see as potential liabilities in the general election­ — former coal baron Don Blankenship in West Virginia and Mississippi state Sen. Chris McDaniel.

Other races, in Indiana and Montana, are quickly becoming costly slugfests, distracting the party from its central mission of dislodging vulnerable Democratic incumbents.

“Before you get to the big dance, you always have the intrafamily feuds. And there’s a lot of primaries going on right now,” said Sen. John Thune (R-S.D.), one of McConnell’s top deputies. “But hopefully when it’s all said and done, the dust settles and the smoke clears, we’ll have candidates that are electable in November.”

The conflicts come at a time when Republican Senate primaries across the country are devolving into free-fire zones, with millions of dollars worth of negative ads being spent against GOP candidates.

Unlike the House, where the map of competitive seats gives Democrats a clear shot at retaking the majority, the Senate playing field still gives Republicans a significant advantage. Ten Senate Democrats are running for reelection in states Trump won, and Democrats need a net gain of two seats to retake control of the chamber.

While Democrats have successfully avoided contested primaries in Senate races, efforts to clear the field on the Republican side have failed in several states. In some cases, deep-pocketed GOP donors have lined up against each other, filling the coffers of outside groups intended to blister primary rivals.

Republican tensions have flared even in contests where there are no competitive primaries. Corker lavished praise Wednesday on Tennessee’s leading Democratic contender, former governor Phil Bredesen, calling him “a very good mayor, a very good governor, a very good business person,” who could win in November.

The remarks set off alarm bells at the highest levels of the Republican Party and supporters of the leading GOP candidate in the race, Rep. Marsha Blackburn, interpreted them as a personal slight. McConnell’s allies spoke with White House aides about organizing a public response.

President Trump called Blackburn on Wednesday from his club in Palm Beach, Fla., and told her he disagreed with Corker’s comments and promised to help her campaign, according to two people familiar with the call who requested anonymity to speak candidly. Trump tweeted his endorsement of Blackburn on Thursday afternoon.

McConnell and Corker, who has said he will support Blackburn, had a lengthy discussion on the Senate floor Wednesday about his remarks, according to three people with knowledge of the conversation. McConnell told Corker his comments were unhelpful — both in the Tennessee race and in the larger battle for the Senate majority, the individuals said.

McConnell also reminded Corker that Republicans were in the current situation only because Corker had decided to retire. Bredesen, a top Democratic recruit, entered the race after Corker bowed out. The conversation did not end on a confrontational note, the individuals said.

Corker declined to comment on the conversation, as did a representative for McConnell.

But Democrats have seized on Corker’s comments as a boon for their chances in November. “I’m glad he’s sharing his views with the people of Tennessee,” said Sen. Chris Van Hollen (Md.), who chairs the Democratic Senate election effort. “He’s got a lot of credibility. He’s also giving firsthand testimony.”

The three candidates running for the GOP nomination to challenge Sen. Joe Manchin III (D-W.Va.) have created a prime example of a primary that has become an early distraction from Republican goals.

Candidates and outside groups have at various points in the past month accused contenders in the race of contaminating West Virginia groundwater, voting for gun control and indirectly profiting from work with the abortion provider Planned Parenthood, issues that could all be damaging in the general election. A Democratic group called Duty and Country, which hasn’t identified its donors, has also weighed in on the race, attacking two of the candidates with television commercials.

At a candidate forum Wednesday in Missoula, Mont., former Billings judge Russ Fagg laid into the most well-funded candidate in the race, state Auditor Matt Rosendale, calling him a Maryland transplant who came to the state only to run for office. Allies of Sen. Jon Tester (D) have rejoiced at a line of attack they will probably pick up in the fall if Rosendale, who cuts his hair in the same flat-top style as Tester, is the nominee.

Perhaps the nastiest race in the country has been playing out in Indiana, where Sen. Joe Donnelly (D) is running for reelection. All three Republican candidates have been tearing into each other for months, questioning one another’s motives, conservative credentials and allegiance to Trump. Led by Mike Braun, a self-funding business executive, the candidates have spent more than $3 million on ads since Feb. 28, according to two strategists who spoke on the condition of anonymity to freely discuss campaign spending.

Allies of McConnell are most concerned about the candidacies of McDaniel in Mississippi and Blankenship in West Virginia, whom they view as liabilities in November. In both cases, outside groups tied to McConnell allies have begun running ads in an effort to sink their candidacies.

In West Virginia, a group called Mountain Families PAC, which is run by a Washington-area strategist who has worked with the National Republican Senatorial Committee, has spent $757,334 on ads attacking Blankenship in recent weeks, according to the strategists who track the spending.

“I think it’s better when folks in West Virginia sort out those primaries, but I definitely support the idea of nominating somebody who’s electable,” said Sen. John Cornyn (Tex.), the second-ranking Republican senator. “I think somebody with a criminal conviction — that’s a high hurdle to overcome.”

The former chief executive of Massey Energy, Blankenship has been campaigning while on parole after serving a year in federal prison for a misdemeanor conviction of conspiring to violate mine-safety laws.

Blankenship, who is self-funding his campaign, has promised to punch back hard at anyone who attacks him during the campaign. “The Russians and McConnell should both stop interfering with elections outside their jurisdictions,” Blankenship said in a Facebook post this week, which also compared McConnell to a professional wrestler and called him “a Swamp captain.

The U.S. Chamber of Commerce, another longtime ally of McConnell’s efforts, has begun targeting McDaniel, a hard-right conservative, with a six-figure campaign in Mississippi that includes a spot casting him as a “trial lawyer” who “lined his pockets” with money. “Think you know Chris McDaniel?” the ad ends. “Think again.”

Other races are likely to become more competitive later this summer. In Wisconsin, where party strategists once hoped for an uncontested primary to focus early on Sen. Tammy Baldwin (D), two outside groups, each funded by wealthy residents, have been harboring funds for former Marine Kevin Nicholson and state Sen. Leah Vukmir.

Some Republican strategists and officials believe the White House is partly culpable for the messy Senate primaries that have erupted across the map. “They got behind the curve,” said one, who called the White House political operation in 2017 a “clown show.” The Republican spoke on the condition of anonymity to be candid.

The White House should have done more earlier in the election cycle to get behind strong contenders and prevent flawed candidates from rising, the Republican said. While the White House is doing a better job these days, this person said, the mismanagement of last year has come at a cost.

The business of running the Senate has become more difficult as well.

The Senate’s main focus in the coming months will be confirming Trump administration nominees and federal judges. With the sharp partisan warfare that has seized the chamber, those fights could be contentious.

McConnell’s margin for error has been whittled to its narrowest point since he became majority leader. With McCain out, he is operating with a 50-49 advantage over Democrats.

The tensions were on display Wednesday during a procedural vote over the nomination of Rep. Jim Bridenstine (R-Okla.) to run NASA. Sen. Jeff Flake (R-Ariz.) initially voted against moving forward. Later, he agreed to vote yes. Cornyn said Flake wanted to talk to secretary of state nominee Mike Pompeo about travel restrictions to Cuba.

On Thursday, McConnell and Flake had a private conversation on the floor of the Senate. The retiring Arizona Republican is emerging as another potential headache for McConnell, who is trying to get Trump’s Cabinet nominees cleared in short order. Flake has not said whether he will support Pompeo’s nomination.

Seung Min Kim contributed to this report.