With five days left until the New Hampshire primary, Donald J. Trump and his allies are stepping up their efforts to muscle Nikki Haley and Ron DeSantis out of the Republican presidential race by casting Mr. Trump’s nomination as inevitable.

The strategy reflects an urgent desire to end the race quickly and avoid an extended and expensive battle for delegates heading into Super Tuesday on March 5.

Mr. Trump is facing 91 criminal charges in four jurisdictions, as well as two costly civil trials, where he has used voluntary appearances at New York courthouses this month as public relations and fund-raising vehicles. But February offers him few such opportunities, meaning he would need to rely on his political strength alone to generate momentum for Super Tuesday, when voters in 16 states and territories will cast ballots for the nomination.

In New Hampshire, Mr. Trump began attacking Ms. Haley with paid advertising weeks ago, and intensified the onslaught more recently with sharper personal criticisms and campaign statements portraying her as a China-loving globalist. On Tuesday, he went after Ms. Haley, the daughter of immigrants from India, on his social media website, using her birth name — Nimarata, which he misspelled as “Nimrada” — as a dog whistle, much like his exaggerated enunciation of former President Barack Obama’s middle name, “Hussein.”

And he has grown more aggressive on the campaign trail. In Portsmouth, N.H., on Wednesday night, he said of Ms. Haley, “I don’t know that she’s a Democrat, but she’s very close. She’s far too close for you.”

But his team is looking ahead to the South Carolina primary on Feb. 24 as a “Waterloo” for his primary rivals, according to one Trump adviser, likening the state to the battlefield where Napoleon met his final defeat. Their aim is to humiliate her in her home state.

“South Carolina is where Nikki Haley’s dreams go to die,” another senior Trump adviser, Chris LaCivita, said in a brief interview.

Mr. Trump has been privately courting Senator Tim Scott of South Carolina, hoping to win his endorsement before the primary. Trump allies who have relationships with Mr. Scott, including Senator Lindsey Graham of South Carolina, have been assisting the effort.

Republicans across the country, including senators who were previously skeptical of Mr. Trump, are assisting his strategy by consolidating their support, rushing to declare the race over, rolling out endorsements and demanding that his rivals quit immediately to “unify” the party against President Biden.

Their efforts are being aided by the conservative news media, which has turned sharply against Mr. DeSantis after giving his candidacy favorable coverage early on.

The inevitability strategy also appears to be bearing fruit within the business community. On Wednesday morning, one of Wall Street’s most powerful chief executives, Jamie Dimon, the head of JPMorgan Chase — who as recently as November urged donors to “help Nikki Haley” — praised aspects of Mr. Trump’s record and scolded Democrats for vilifying the former president’s Make America Great Again movement.

Ms. Haley and Mr. DeSantis both insist their campaigns are alive and well, with plans to compete deep into March. But the reality is that a comeback victory would represent one of the greatest upsets in modern American political history. That would be especially true if Mr. Trump wins New Hampshire, since no Republican who has won two of the first three traditional early states — Iowa, New Hampshire and South Carolina — has ever lost the party’s nomination.

Ms. Haley finished a disappointing third in Monday’s Iowa caucuses but is facing what polls suggest is more favorable terrain in New Hampshire, where unaffiliated voters can cast ballots in the primary and where her allies argue even a close second could provide a rationale to stay in the race. Even there, however, she needs a large turnout of unaffiliated voters to overcome Mr. Trump’s overwhelming backing from Republicans.

“She basically has to turn the Republican primary into the unaffiliated primary,” Mr. LaCivita, the senior Trump adviser, said of the state.

Ms. Haley’s path to a competitive race seems more visible than Mr. DeSantis’s, but only barely: She must win the New Hampshire primary next Tuesday or come in a very close second, and ride a wave of media momentum for a month before tackling Mr. Trump head-on in the state she used to govern, South Carolina, where he has a huge lead and endorsements from powerful politicians there, including the governor.

In New Hampshire, the Trump campaign is trying to engage what one adviser called a “pincer” — squeezing Ms. Haley from both ends of the ideological spectrum. An advertising campaign began lacing into her on immigration (hitting her from the right) before criticizing her for wanting to raise the retirement age for Social Security (hitting her from the left).

Ms. Haley is trying to portray Mr. Trump and Mr. Biden as two of the same: Disliked elderly politicians who are exacerbating chaos and division in America. It’s a message tailored for independent voters who have tired of Mr. Trump, but the message will most likely have far less purchase among Republican voters.

While Ms. Haley is courting independent voters in New Hampshire, it’s harder to see how a Republican candidate can win a Republican nomination without much stronger support from Republicans.

On Wednesday, Ms. Haley’s campaign manager, Betsy Ankney, rejected the notion that Ms. Haley’s strategy was to rely on independent and crossover Democratic voters to make up for softer support among Republicans.

Ms. Ankney said the strategy has always been to do well in New Hampshire, roll out with momentum into South Carolina and then go head-to-head against Mr. Trump on Super Tuesday, when independents have historically made a difference in open or semi-open primaries, including in 2016 for Mr. Trump.

Polls showing Mr. Trump far ahead in Texas and other Super Tuesday states should not be taken seriously, Ms. Ankney insisted, because “people have not started to pay attention” in those states and “there has been zero advertising.” The Haley campaign is optimistic that she can perform especially strongly in March states that have larger populations of college-educated voters, including Virginia.

Mr. Trump’s team is far less worried about Mr. DeSantis, who finished in second place in Iowa just two points ahead of Ms. Haley, but who is far behind in New Hampshire. The Trump team suspects Mr. DeSantis will struggle to keep his candidacy financially afloat long enough to compete seriously on Super Tuesday.

The DeSantis path beyond February is murky — a fact reflected by the pro-DeSantis super PAC’s decision on Wednesday to lay off staff in some of its March 5 states. But the DeSantis team insists the candidate has no plans to drop out before South Carolina.

“There is no mathematical pathway for Nikki Haley to win the nomination,” said David Polyansky, the DeSantis deputy campaign manager. “And even if she makes it to South Carolina, no amount of Wall Street money will bail her out from losing her home state, and then it will be a two-person race between Ron DeSantis and Donald Trump.”

A majority of Mr. DeSantis’s staff is moving to South Carolina, and he will mostly stop campaigning in New Hampshire after his events on Wednesday, according to a person familiar with his plans, who insisted on anonymity.

The fact that South Carolina was his first stop after Iowa was described as an intentional signal about his electoral calculations.

On a staff call after Iowa, Mr. DeSantis’s campaign manager, James Uthmeier, described Mr. DeSantis’s view: The caucuses showed that Mr. Trump doesn’t have the standing he once did after getting just over 50 percent, and that Republicans want an alternative, according to people familiar with what was said.

Mr. DeSantis’s advisers remain furious at the Haley camp’s decision to spend more than $20 million attacking Mr. DeSantis on television ads before Iowa, which a top aide publicly described as “greed” ahead of the caucuses and insisted was meant to help Mr. Trump. The DeSantis team has openly accused Ms. Haley of campaigning to become Mr. Trump’s running mate and not to win, a claim that she has denied.

In a late November phone call, days before the political network founded by the billionaire Koch brothers endorsed Ms. Haley, Mr. DeSantis had warned a Koch network operative that any money they spent aiding Ms. Haley and attacking Mr. DeSantis would only help Mr. Trump, according to two people familiar with the conversation. That’s because many DeSantis voters still liked the former president and would sooner peel off and support him than back Ms. Haley, who is viewed as more moderate. Mr. DeSantis told the operative that the money should be spent going after Mr. Trump, the people familiar with the call said.

The Koch network went ahead with its endorsement of Ms. Haley and put its expensive ground operation into her service, sweeping out across Iowa and New Hampshire in a last-minute sprint of door knocking.

Another element of Mr. Trump’s inevitability messaging is his growing discussion of possible personnel for a second term. Mr. Trump, who out of superstition has long avoided discussing who might serve in his administration, has begun indulging discussions of who might serve alongside him.

At his Iowa victory party on Monday night, Mr. Trump brought onstage Gov. Doug Burgum of North Dakota, who had ended his own presidential campaign and endorsed the front-runner. Mr. Trump told the audience that he had Mr. Burgum pegged for an important role in his administration.

Another former rival, Vivek Ramaswamy, immediately dropped out after the caucuses, endorsed Mr. Trump and urged all other candidates to do the same. As he appeared onstage with Mr. Trump at a rally in Atkinson, N.H., on Tuesday night, Mr. Trump grinned broadly as the crowd chanted, “V.P., V.P., V.P.”

“He’ll be working with us for a long time,” said Mr. Trump. It was a whiplash reversal that’s typical of Mr. Trump. Two days earlier, he had attacked Mr. Ramaswamy as “not MAGA.”

Such rapid consolidation of the party behind Mr. Trump has visibly frustrated Mr. DeSantis and his allies, given that less than a year ago there was a moment when it seemed as if Republicans might be ready to move on and coalesce around the Florida governor.

No defection was more emblematic of the shift than that of Senator Mike Lee of Utah. Mr. Lee was an early booster of Mr. DeSantis’s presidential run and had met with the governor to discuss policy, according to a person with direct knowledge, who spoke on the condition of anonymity to describe private meetings.

Mr. Lee did not give Mr. DeSantis a heads up before he announced that he was endorsing Mr. Trump just three days before the Iowa caucuses, that person said. The DeSantis team saw the timing as a knife in the back.

Dan Hauser, a campaign adviser to Mr. Lee, said in a statement that the senator didn’t call any candidate in the race before he endorsed Mr. Trump.

In another personal twist, Mr. Lee’s wife, Sharon, had worked for the DeSantis super PAC, Never Back Down. She left the group “a couple of months ago on her own terms,” according to Mr. Hauser.

Michael Gold contributed reporting.