The much-fabled power of New Hampshire’s fiercely independent voters wasn’t enough to break the spell Donald J. Trump has cast over the Republican Party.

Brushing aside Nikki Haley a little over a week after he steamrolled her and Ron DeSantis in Iowa, Mr. Trump became the first Republican presidential candidate who was not a White House incumbent to carry the nation’s first two contests. His winning margin of 11 percentage points in moderate New Hampshire demonstrated his ironclad control of the party’s hard-right base and set him on what could very well be a short march to the nomination.

For Ms. Haley, the former South Carolina governor, it was a disappointing finish in a state she had poured considerable resources into carrying. Her efforts to cobble together a coalition of independents and anti-Trump Republicans, with support from the state’s popular governor, were no match for Mr. Trump’s legions of loyalists.

Even though Ms. Haley is vowing to fight on, the difficult terrain ahead in South Carolina means that this first-in-the-nation primary could turn out to be the last.

In 2016, Mr. Trump’s win in New Hampshire put him on a path to the nomination and ultimately the presidency.