WASHINGTON — Before she agreed to run for the Senate in Arizona this year, Representative Martha McSally reached an agreement with White House officials: President Trump would remain on the sidelines and not endorse one of her more conservative competitors.
But a few weeks ago, Ms. McSally and other establishment Republicans were worried enough about her prospects that they returned to the White House with a new appeal, according to multiple party officials familiar with the conversations: Could Mr. Trump drop his neutrality and endorse her candidacy after all?
Ms. McSally’s shifting requests illustrate Mr. Trump’s ability to play kingmaker and effectively decide competitive primaries. But, more consequentially, they demonstrate the willingness of mainstream Republicans like Ms. McSally, who will not say whether she even voted for Mr. Trump in 2016, to link themselves to the president if they want to win.
The Republican nominating season will largely conclude on Tuesday with the Arizona Senate race and the Florida governor’s contest, leaving a paradox looming over the Washington: Even as legal questions swirl around the presidency, Mr. Trump’s grip on G.O.P. primary voters is as strong as it has been since he seized the party’s nomination a little over two years ago.
Mr. Trump’s outsized influence offers him a measure of political insurance. And some of his leading allies are already warning Republican officeholders who may be faced with an impeachment vote in a Democratic-controlled Congress to be fully mindful of the president’s popularity with their shared base.
“He’ll attack you, your money will dry up and you will lose your primary,” Corey Lewandowski, Mr. Trump’s former campaign manager, said about the consequences Republican lawmakers would face if they turned on the president. “Go ask Mark Sanford what fighting with the president will get you.”
Mr. Sanford, a South Carolina congressman, lost a primary to the Trump-endorsed Katie Arrington in June. Mr. Lewandowski also invoked Senators Jeff Flake of Arizona and Bob Corker of Tennessee, two Trump critics who retired rather than seek re-election this year. And he brought up Senator Ben Sasse of Nebraska, another frequent detractor of the president, to pointedly note that Mr. Trump’s high command is well aware Mr. Sasse’s term is up in 2020.
Mr. Trump’s endorsements have included many candidates who did not face serious primary challenges. But they have also proved decisive in some races, or at least ensured victory for candidates in tight races, such as Brian Kemp, the Republican nominee for governor in Georgia.
The endorsements may arrive in the form of a tweet weeks or months before any votes are cast or the day before or even on Election Day. The most full-throated endorsements are accompanied by rallies with Mr. Trump or the vice president, exciting the party faithful and prompting them to turn out for the vote.
To the dismay of some party leaders, though, a handful of the candidates Mr. Trump has pushed through the primary may prove weaker general election candidates than their rivals would have been, forcing the party to spend more money this fall.
Mr. Trump has relished his role as the decider in chief, growing more emboldened about intervening in intraparty contests as nearly all of the candidates he has backed in primaries this year have won. (One recent misfire: the Wyoming governor’s race last week, where his preferred candidate came in second.)
But the president has also complained to advisers thatleaders like Senate Majority Leader Mitch McConnellare laying on the flattery about how he’s the only figure who can settle races, but not more aggressively defending his embattled administration in public, according to a senior White House official.
Mr. Trump has, as with so much else, redefined the political role of the presidency to fit his own unconventional style rather than bowing to the customs of the office.
“Traditionally in the two-party system, politicians and their team try to make their base bigger,” said Haley Barbour, the former Mississippi governor and Republican National Committee chairman. “Trump keeps trying to make his base harder.”
Inserting himself in race after race with little warning, Mr. Trump has demolished the tradition of presidents remaining neutral in primaries, upended the well-laid plans of state and national power brokers and rewarded allies, new and old, in their nomination fights. In doing so, he is creating more loyalists who owe their success to him.
The president has found success wading into contested governor’s primaries in South Carolina, Georgia and Kansas, and he may have had the most impact with his early support for Representative Ron DeSantis, who is leading in the polls in the Florida governor’s primary.
“If a president wants to reshape the party in his own image there’s no better way to do that than to impact the outcome of primaries,” said Kris Kobach, the Kansas secretary of state and nominee for governor who got a late endorsement in his primary from Mr. Trump.
The president’s endorsements have largely been done to repay supporters, but Mr. Trump has also sought to solidify new alliances by lending a hand to some former critics. For example, he helped ensure that Senator Dean Heller of Nevada would not have a primary challenger, propelled Representative Martha Roby of Alabama in her runoff, and he even got behind Mitt Romney’s Senate bid in Utah. Each of them, to varying degrees, had criticized the president in 2016.
The White House political director, Bill Stepien, said that Mr. Trump’s endorsement is powerful, “but there are many tools in his political tool kit,” including not engaging openly in a race but working behind the scenes as “party leader.” He said that Nevada was an important example of where the president and his team worked behind the scenes to clear the Senate primary field by nudging a Heller challenger to run for the House instead.
Mr. Lewandowski was even blunter, recalling a Las Vegas dinner he attended in 2017 with Mr. Heller, in which he bluntly told the senator that if he did not fall in line with Mr. Trump, the president’s allies would aggressively target him. “I said, ‘With all due respect, I will not miss.’” Mr. Lewandowski recalled.
This is not to say Mr. Trump has totally forgiven and forgotten those who denounced his campaign — or that the president’s advisers do not strategically highlight past critiques when they believe it is best for him to stay out of races.
Few 2018 Republican candidates, for example, were as aggressive in lobbying for Mr. Trump’s endorsement as Representative Diane Black of Tennessee, who came in third in her state’s primary for governor this month. She approached the president at a White House event, had some of his most high-profile congressional allies weigh in on her behalf, and even deployed some West Wing officials who are friendly to her.
But most of Mr. Trump’s aides wanted him to stay out of the race, and they were able to keep him sidelined in part by reminding him of what Ms. Black said after the video of Mr. Trump boasting about groping women was released in 2016 (“I would’ve yanked my son by the ear if he had talked that way when he was a teenager much less an adult,” she said at the time).
In the early months of his administration, Mr. Trump’s approach to politics was, like most everything else, haphazard.
But since then, Mr. Stepien and Johnny DeStefano, the head of presidential personnel, have imposed a measure of order to the process (or at least as much as somebody as impulsive as Mr. Trump will tolerate), with the chief of staff, John F. Kelly, guaranteeing them face time with the president that they struggled to get in 2017.
Thick binders have been assembled on all high-level Republican candidates and sitting members of Congress. The binders include their votes, their behavior on social media and what they said about Mr. Trump as he sought the presidency.
In the most significant races, a survey has been sent to the candidates asking where they stand on issues and requesting that they grade the president. The candidates are judged on several criteria, including how quickly they respond.
Last Thursday, for example, Mr. Trump offered his support for Senator Cindy Hyde-Smith of Mississippi, giving her a leg up against former state Senator Chris McDaniel, a hard-right Republican, in a November special election there.
But the president only blessed Ms. Hyde-Smith after she met a series of requests from the White House.
“There were clear expectations and benchmarks and things like that that the senator was supposed to hit,” said Brad White, Ms. Hyde-Smith’s chief of staff, explaining: “They looked at things from fund-raising to the type of senator she was to votes. It was very methodical.”
But even as his staff has introduced some discipline and organization to the process, Mr. Trump has on occasion still gone his own way, because of the many outside influences on his thinking.
It was largely overshadowed by the other, more serious blows he absorbed last week, but the president suffered his first loss in a primary this year when he endorsed the Republican donor Foster Friess in the Wyoming governor’s race only to see Mr. Friess be handily defeated.
Mr. Trump, who only tweeted his support on the morning of the primary, was cajoled into the endorsement by his eldest son, Donald Trump Jr., who prodded him a few times on it, according to two Republican officials familiar with the conversations. (The younger Mr. Trump wrote an op-ed endorsing Mr. Friess earlier this month.)
As for Ms. McSally’s race in Arizona — where she faces the former Maricopa County Sheriff Joe Arpaio and Kelli Ward, a one-time state senator — Mr. Trump’s advisers determined that she would likely win the primary even without the president’s support. Her pleas, they decided, were only aimed at saving a few million dollars she’d need to spend to ensure victory without the president’s blessing.