Three years ago, high-level Republicans declared that after losing the popular vote in five of the past six presidential elections, the party needed to appeal more to Latinos to win the White House. Immigration was a threshold issue.

Hispanics are the fastest-growing slice of the electorate. The 2012 Republican nominee, Mitt Romney, took an anti-immigration stance and got only 27 percent of that vote. It had not always been so. George W. Bush won almost 40 percent of the Hispanic vote in 2004. Twenty years earlier, Ronald Reagan did as well, according to some estimates.

Today, however, this notion has been turned upside down. Donald J. Trump has soared to the top of the Republican presidential field with an immigration-bashing pitch. The billionaire businessman has set the agenda for other aspirants: Senator Ted Cruz of Texas has hardened his anti-reform position, Senator Marco Rubio of Florida and Gov. Chris Christie of New Jersey have reversed course to adopt tougher-on-immigration stances, and Gov. John Kasich of Ohio has similarly hedged.

More Republican politicians, along with some conservative commentators and strategists, now say Mr. Trump’s hard line is good politics because it taps into deep cultural, economic and security fears.