(CNN) President Donald Trump's threats to relocate undocumented immigrants and asylum seekers to "sanctuary cities" capture his determination to constantly press the boundaries of law and morality with hardline immigration policies. But it may reveal even more about his political posture toward the nation's biggest population centers.

In 2016, Trump lost the largest metropolitan counties by a bigger margin than any Republican presidential candidate in modern times. In 2018, House Republicans were routed in suburban districts not only in metropolitan areas already trending toward Democrat -- such as the suburbs of Denver, Philadelphia, Seattle and northern Virginia -- but also in places that had still leaned toward the GOP, including Atlanta, Dallas, Houston, Richmond and even Oklahoma City.

But rather than looking to rebuild bridges with these growing population centers, Trump appears determined to use them as a foil to energize his predominantly non-urban base.

"He wants to portray cities as alien to the two-car garage in Naperville," outgoing Chicago Mayor Rahm Emanuel told me in an interview, referring to a suburb west of his city. "They want to make the soccer mom more scared."

Big city mayors mostly greeted Trump's public musings about sending them undocumented immigrants with contempt. "America was a sanctuary country before Chicago was a sanctuary city," Emanuel told me. "Send them: we'll welcome them, and we'll enroll their kids in our schools."

Seattle Mayor Jenny Durkan likewise wrote in the Washington Post last weekend: "So if this president wants to send immigrants and refugees to Seattle and other welcoming cities, let me be clear: We will do what we have always done, and we will be stronger for it."

It's far from clear whether Trump has the legal authority to forcibly relocate undocumented immigrants and asylum seekers to big cities as he's suggested.

But even the brandishing of the threat extends his extraordinarily antagonistic relationship with the nation's metropolitan centers. The irony is that Trump himself is a product of urban politics, real estate celebrity and tabloid culture in New York City -- not a suburban, much less rural, environment.

Trump's policies have cost cities

Trump has already tried to withhold certain federal law enforcement funding for so-called sanctuary cities that do not fully cooperate with federal law enforcement officials on immigration matters, though such cities have largely succeeded in blocking those threats in the courts.

The tax bill the GOP Congress approved in 2017 cut rates for taxpayers in every sized community, but it imposed costs on city residents by limiting federal deductions for both state and local taxes and high-cost mortgages. The taxpayers who claim those deductions tend to be more heavily concentrated in urban areas where housing costs, and property taxes, are higher: all of the ten counties, for instance, where taxpayers took the largest average deductions for state and local taxes in 2016 were located around the New York City and San Francisco metropolitan areas, according to the conservative Tax Foundation

The federal budget that Trump released in March displayed an even more pronounced tilt toward rural over urban areas. Trump proposed big cuts for mass transit and Amtrak , which mostly serve cities, coupled with increases in funding for rural infrastructure projects. He also proposed big cuts in federal housing programs that benefit cities and the elimination of the Community Development Block Grant, which supports housing and economic development programs.

Cities now face a "dead ball" era of indifference -- if not hostility -- from the federal government, New York City Mayor Bill de Blasio told me earlier this month when I interviewed him at an Atlantic event.

"There is not again a federal affordable housing policy," he said at the time. "There's not a federal policy to address income inequality; there's not a federal early childhood education policy; there's not a federal affordable housing policy."

Moving the GOP from 'the country club to the country'

Trump has bracketed these policy proposals with frequent rhetorical attacks in which he's portrayed major cities -- particularly Chicago -- as crime ridden and chaotic. "His goal is to drive a wedge between suburban and urban," Emanuel charges. "He's trying to make cities scary to the core suburban voter."

Trump's confrontational relationship with the largest cities extends his central political strategy of focusing almost entirely on energizing his political base even at the expense of heightening resistance from the voters outside of it. Demographically, that means tolerating intense antipathy from younger voters, minorities and many college-educated white voters in service of mobilizing older, evangelical and blue-collar whites. Geographically, that means accepting huge deficits in urban and inner-suburban areas at the cost of expanding the GOP advantages in exurban, small town and rural communities.

The GOP's retreat in major metropolitan areas and growing reliance on small town and rural voters predates Trump's rise. But that shift -- what former Virginia Republican Rep. Tom Davis calls the GOP's transition "from the country club to the country" -- has demonstrably accelerated as Trump has redefined the party around his racially-infused economic nationalism.

During the presidential elections of the 1980s, Republican Ronald Reagan won about two-thirds of the nation's 100 largest counties each time and George H.W. Bush carried nearly three-fifths of them, according to calculations by Drew DeSilver, a senior writer at the non-partisan Pew Research Center . Those numbers fell sharply for the GOP over the next 15 years but even as recently as 2000 and 2004, George W. Bush carried nearly one-third of the 100 largest counties in each of his two presidential victories. The Republican position in urban America slipped further under Barack Obama, who won 88 of the 100 largest counties in 2008 and only 86 of them in 2012, according to DeSilver's calculations.

In 2016, Hillary Clinton carried a comparable 87 of the 100 largest counties against Trump, but she significantly expanded on Obama's total vote margin in those places.

Obama in 2012 carried the 100 largest counties by a combined 11.6 million votes. That was itself a big increase from Al Gore's margin of 6.8 million votes over Bush in the 100 largest counties as of 2000.

But in 2016, Clinton won the 100 largest counties by nearly 14.7 million votes, over a quarter more than Obama did. In places from Seattle (Kings County) and Los Angeles to Houston (Harris County), New York and Miami (Miami-Dade), Clinton amassed significantly greater vote margins than Obama just four years earlier. Clinton won Harris County, for instance, by about 162,000 votes after Obama carried it by less than 1,000. She won Seattle by 110,000 more votes than Obama did and LA by over 360,000 more.

Clinton was badly hurt by slight declines in her margins in Philadelphia and Milwaukee, and a larger slip in Detroit, three heavily African-American cities where black turnout ebbed relative to 2012. But overall, Trump faced a historic repudiation in the largest places: those 100 counties alone provided more than half of Clinton's total votes.

2018 was a turning point

The Republican retreat in major metropolitan areas accelerated in the 2018 midterm elections. Trump, as noted above, won only 13 of the 100 largest counties in 2016. Over half of even that small group moved toward the Democrats in key statewide races in 2018.

In Arizona, Democratic Senate candidate Kyrsten Sinema's victory in Maricopa County around Phoenix-- the largest county that Trump won two years earlier -- was central to her statewide win. In Texas, Democratic Senate candidate Beto O'Rourke narrowly carried Tarrant County (Fort Worth), the second largest county that voted for Trump in 2016. In New York, Democratic Sen. Kirsten Gillibrand carried Suffolk County, the third largest Trump county (though voters there also supported Republican Rep. Lee Zeldin in the House). In Florida, Democratic gubernatorial candidate Andrew Gillum won Florida's Pinellas County (St. Petersburg), the fourth largest county that Trump won.

In the House, Democrats last year consolidated their dominance in urban areas. According to the innovative system the CityLab website has developed for ranking House seats on an urban to rural continuum, Democrats emerged from the 2018 election holding 149 of the 165 seats in the three most urban categories of districts. Before the election, Republicans had held 35 seats in the three most urban groupings. Republicans, CityLab found, also suffered big losses in the "sparse suburban" category of House seats that represent the boundary between more urbanized and small town/rural areas.

The flip side of the GOP's urban unraveling under Trump is a consolidation of its hold over smaller communities. In 2016, though Clinton won 87 of the 100 largest counties, Trump won about 2,600 of the other 3,000 -- the most for any nominee in either party since Ronald Reagan in 1984. In several pivotal states, such as North Carolina and Florida, he overcame big deficits in urban areas with unprecedented margins and turnout in small town and rural places.

Even in 2018, Democrats made only minimal inroads into the GOP's rural redoubts: after the midterms, the GOP still leads Democrats by 149-35 in the two most rural categories of House seats. And the Republican Senate pickups in Missouri, North Dakota and Indiana all pivoted on the party's growing small-town strength. Even in Texas, Republican Ted Cruz so dominated rural areas that he was able to overcome O'Rourke's stunning margin of 800,000 votes in the state's five largest counties. (As recently as 2012, Obama won those same five counties by only a combined margin of about 80,000 votes.)

Some Republican strategists -- such as pollster Whit Ayres and Virginia's Tom Davis, the former chair of the National Republican Congressional Committee -- have warned that in prioritizing rural over metro areas, the GOP is trading smaller places that are stagnating or losing population and economic clout for bigger places that are gaining on both fronts . But Trump's latest threats to relocate undocumented immigrants to big cities capture his indifference to those concerns.

Trump is wagering the 2020 election, and possibly the GOP's future for years beyond, on a very different bet: that the party has more to gain from castigating the nation's largest cities than from courting them.