(CNN) The firestorm over the separation of children from their undocumented parents at the border has almost completely overshadowed another milestone in the long-running national immigration debate: Opposition to legal, as well as illegal, migration is hardening into a bedrock principle of the Republican Party.

With last week's vote in the House of Representatives on hardline immigration legislation from GOP Rep. Bob Goodlatte of Virginia, about three-fourths of Republicans in both the House and Senate have voted this year to cut legal immigration by about 40%. That would represent, by far, the largest reduction in legal immigration since Congress voted in 1924 to virtually shut off immigration for the next four decades.

And while each of the bills this year to slash legal immigration ultimately fell short of passage, their preponderant support among Republicans marked a telling shift in the GOP's center of gravity: The last time Congress seriously considered cuts in legal immigration during the 1990s , about three-fourths of Senate Republicans, and about one-third of House Republicans, opposed it.

"It tells me that the party is more interested in reducing the number of foreigners in the United States than in reducing illegal immigration," says David Bier, an immigration policy analyst at the libertarian Cato Institute. "One reason to allow people to immigrate legally is to reduce the incentives to come illegally, and so this entire portion of that immigration bill is working at cross-purposes to the goal of securing the border and reducing illegal immigration."

New opposition to legal immigration

For years, many Republicans have claimed that even as they demanded a crackdown on undocumented, or illegal, immigration, they supported a robust system of legal immigration. Even President Donald Trump nodded to that tradition in a tweet on Sunday when he insisted that illegal immigration "is very unfair to all of those people who have gone through the system legally and are waiting on line for years!"

But, in fact, the vast majority of congressional Republicans this year have now voted for Trump-backed legislation that would not only crack down on undocumented immigration but also severely constrict legal entry into the country, including for millions of those who, as Trump put it, have been "waiting on line for years" to enter legally.

"It really looks like the entire debate about illegality is not the main issue anymore for Republicans in both chambers of Congress," notes Bier. "The main goal seems to be to reduce the number of foreigners in the United States to the greatest extent possible."

Nativist rhetoric

The result is that Republicans are now engaged in a two-front war against both legal and undocumented immigration. Trump has clearly signaled he intends to emphasize illegal immigration as a primary wedge issue for the November elections: Even amid the chaos over separations at the border, he's turned to more overtly nativist and racist language, charging that undocumented immigrants "infest" and "invade" the US and urging an end to due process protections for them.

Congressional Republicans, in turn, have backed away from earlier promises to legally protect the so-called "Dreamers," young people brought to the country illegally as children. After Trump rescinded former President Obama's policy sheltering those young people from deportation, House Speaker Paul Ryan, among other leading Republicans, promised Congress would provide a lasting solution. But every Senate proposal to protect them failed, with the vast majority of Republicans voting no.

In the House, moderate Republicans backed off their plan to force an up or down vote on protecting the young people through a discharge petition when Ryan promised them he'd craft a comprehensive plan. But amid resistance from conservatives, Ryan's immigration bill is also likely to fail this week -- if it comes to a vote at all after Trump publicly questioned its value.

Defying a history of bipartisan efforts

JUST WATCHED TIME editor defends controversial cover Replay More Videos ... MUST WATCH TIME editor defends controversial cover 03:24

If Ryan's measure fails, as appears virtually certain, it would mark the third time in the past 12 years that House Republicans have refused to legalize any contingent of undocumented immigrants. In 2006 and 2013, the Republican House leadership refused to even schedule a vote after bipartisan Senate majorities passed legislation combining tougher immigration enforcement with a pathway to citizenship for many millions of undocumented immigrants.

The Goodlatte bill provides the most revealing gauge of how far the immigration priorities of most House Republicans diverge from those goals. The bill failed in the House last week when 41 Republicans joined 190 Democrats to oppose it . But 193 House Republicans -- just over 82% of those who voted -- backed the legislation.

That vote stands as a milestone in hardening GOP attitudes against migration because the Goodlatte bill represented a wish list for the party's most anti-immigration forces. By the calculations of Bier and Stuart Anderson, executive director of the National Foundation for American Policy, a pro-immigration group, it would have reduced legal immigration over the coming decades by fully 40% (far more than the 25%, already a historic decline, that the sponsors claimed.) It would have severely limited the opportunity for migrants to seek political asylum in the US. And despite Trump's gesture toward those "waiting in line," the bill, after a short transition through 2019, would have canceled pending immigration applications from about 3 million married adult children and siblings of US citizens who have waited in line for, in many cases, decades, as Biers and Anderson wrote recently

The strong House Republican vote for the Goodlatte bill came after the GOP caucus voted even more overwhelmingly last year for legislation to punish so-called "sanctuary" cities that fail to fully cooperate with federal immigration law. In that June 2017 vote, House Republicans voted 225-7 to cut off a wide array of federal grants to states or cities that limit immigration cooperation and to allow private citizens to sue such jurisdictions if they claim that they or family members were later harmed by undocumented immigrants released through their policies. (Ryan's immigration bill revives that provision.)

Generally, the Senate Republican immigration bills haven't tilted quite as far toward the party's nativist element. But even so, 36 of the 50 voting Republican senators last February voted for Trump-supported legislation sponsored by Senate Judiciary Chairman Charles Grassley of Iowa that would have cut legal immigration by about as much as the Goodlatte bill (though it would not have erased the applications of millions of potential migrants waiting in line). And all 50 voting Senate Republicans last February backed legislation from GOP Sen. Pat Toomey of Pennsylvania to slash federal funding for states and cities that fail to fully cooperate with federal immigration enforcement.

The shifting GOP center of power

Partly, the hard Republican turn against not only undocumented but also legal immigration can be explained by the party's shifting geographic center. In the House, the Senate and the Electoral College alike, Republicans now depend predominantly on the parts of America that have been the least touched by the steady growth in the immigrant population over the past 50 years.

JUST WATCHED Senator: US is encouraging illegal immigration Replay More Videos ... MUST WATCH Senator: US is encouraging illegal immigration 01:24

In the House, about 85% of Republicans represent districts where the foreign-born share of the population was lower than the national average of 13.5% in 2016. Similarly, 42 of the 51 Republican senators represent the 30 states where immigrants compose the smallest share of the population, mostly in the South, the Midwest and the Mountain West. Republicans hold only nine of the 40 Senate seats in the 20 states where immigrants constitute the largest share of the population, most of them along the coasts. In 2016, Trump's pattern of support followed those tracks too: He won 26 of the 30 states with the smallest share of immigrants, but lost 16 of the 20 with the highest.

In both the House and Senate, several Republicans from high-immigration jurisdictions opposed the legislation constricting legal migration. Those opposing the Goodlatte bill last week included Steve Knight, Jeff Denham, David Valadao and Dana Rohrabacher of California, Carlos Curbelo of Florida, Leonard Lance of New Jersey and Barbara Comstock of Virginia. All of them hold swing seats where immigrants make up at least one-fifth of the population. Senate Republican opponents of the Grassley bill included Ted Cruz of Texas and Jeff Flake of Arizona, two high-immigration states.

But a noteworthy number of Republicans from high-immigration jurisdictions in both chambers supported the legislation severely reducing legal immigration. In the Senate , they included Marco Rubio of Florida, John Cornyn of Texas, Cory Gardner of Colorado and David Perdue and Johnny Isakson of Georgia. Those supporting the cuts in the House included John Culberson and Pete Sessions of Texas, Karen Handel and Rob Woodall of Georgia, Dan Donovan in New York City and Mimi Walters in California. All of those House Republicans represent potentially competitive seats where at least one-fifth of the residents were born abroad.

And of course all Republican senators and virtually all GOP House members, no matter how large the immigrant presence in their constituencies, voted to punish "sanctuary" cities.

Those votes are a reminder that in all parts of the country, the Republican coalition now revolves around the elements of American society most uneasy about immigration in particular and demographic change in general: older, blue-collar, evangelical and non-urban whites. In recent polling by the nonpartisan Pew Research Center, Republicans living in urban, suburban and rural communities, for instance, were all far less likely than Democrats in the same places to say that immigrants had improved the quality of life in their neighborhoods.

Americans have consistently indicated they want immigration laws upheld and that they oppose policies that connote open borders or appear to tolerate lawbreaking; that can be a risk for Democrats who too sweepingly criticize immigration enforcement. But the public has also shown a durable pragmatic streak that rejects the core ideas conservatives are pushing to dramatically reduce the immigrant presence in American life.

The disapproving majority vs. the engaged minority

In its most recent national poll , Quinnipiac University found that among all adults, only about one-sixth wanted to reduce legal immigration, while nearly three-fifths opposed building Trump's wall across the Mexican border, three-fourths supported legal status for all of the undocumented and almost four-fifths backed allowing the "Dreamers" to remain in the US and apply for citizenship. Two-thirds opposed the recently suspended Trump practice of separating undocumented children from their parents at the border.

But even as congressional Republicans search for a legislative solution to end family separations, the vast majority of them appear comfortable joining the President in rejecting the lopsided public consensus embodied in those other poll results. That represents one of the party's central gambles in the Trump era: that the minority of Americans deeply uneasy about immigration are more likely to turn out to vote -- and more likely to vote on that issue -- than the majority who support it.

That bet may prove a good one in the non-urban House districts and low-immigrant states at the core of the GOP's current congressional majorities. But it could further erode the party's position in more cosmopolitan states and districts with substantial populations of both immigrants and college-educated whites generally welcoming of them. Many of the most vulnerable Republican House members represent white-collar suburban districts with substantial immigrant populations.

The two most endangered Republican Senate seats this year -- in Arizona and Nevada -- are among the nine they hold in the 20 most immigrant-intensive states; in 2020, the GOP will likely face tough Senate fights in Colorado and Georgia, two more on that list. Texas may become competitive, if still uphill, for Democrats, too -- perhaps as soon as Cruz's re-election race against Beto O'Rourke this fall.

The likely outcome is that the GOP's geographic center over the next few elections will tilt even more toward the places least affected by immigration. That would further strengthen the party's nativist elements at a time when Trump is already championing them. And that means, even as America inexorably grows more diverse, the party is likely to hurtle further away from the support for legal immigration championed by Republican presidents from Ronald Reagan through George W. Bush.

"I don't see any way to get back to it now that Republicans know where their base is on their issue," says Bier. "I would be surprised if you didn't see a more restrictive legal immigration plank than you already have in the GOP platform in 2020."