Forgive Phoenix Mayor Greg Stanton if he feels caught in a crossfire.

For years, Phoenix has been at the center of the escalating nationwide struggle between progressive cities and conservative Republican state legislatures, usually dominated by voices from suburban and rural areas. Now, Phoenix is on the front line of the impending confrontation between cities and an incoming Donald Trump administration championing a racially divisive nationalism most urban leaders consider anathema to both their values and strategies for economic development.

“When they try to preempt us at the state or federal government, we're going to fight,” Stanton, a Democrat in his second-term, told me at a recent Atlantic event here. “I believe we're going to make the right choices so that we can become a tier-one economy...and we're going to do it despite attempts to interfere with [us].”

Phoenix encapsulates the precarious urban dynamic of 2016: As Trump nears the White House, big cities are economically ascendant but politically isolated. Most big cities are again adding population and driving job growth for their states while emerging as hubs of information-age innovation open to ideas, people, trade and investment from around the globe. But politically, cities are reeling under a furious counter-revolt from mostly white voters outside of urban areas who feel eclipsed by the racially diverse, economically globalized, and largely post-industrial future America’s largest metros are forging.

These dynamics are unfolding starkly in Arizona. After staggering in the 2007 housing crash, Phoenix is again the state’s undisputed engine of growth. One recent national ranking put it second to only San Francisco in creating technology jobs since 2013.

In 2015, Stanton steered through passage of a ballot proposition approving a city sales tax increase to fund one of the nation’s most ambitious local transportation plans—a $31.5 billion 35-year blueprint centered on expanded light rail and bus service. This comprehensive effort to create a more walkable city (which includes bike lanes and more dense downtown development) is central to Stanton’s hope of building an economy diversified beyond its traditional pillars of tourism and real estate. The city has aggressively pursued trade with Mexico (doubling exports since 2012), attracted $8 billion in development investment along its light rail line (which will next extend into heavily black and Hispanic communities in South Phoenix) and partnered with Arizona State University to expand its downtown campus.

Like most cities, Phoenix is still struggling to connect more of its minority kids to the economic opportunities it is creating. But those opportunities are blossoming: the Phoenix metro area now accounts for fully 70 percent of Arizona’s total economic output, according to calculations by Mark Muro of the Brookings Institution’s Metropolitan Policy Program from Moody’s Analytics data. Tucson, Arizona’s second largest city, adds about another 15 percent.

Yet while driving the state’s economy, these racially diverse urban centers have faced steady hostility from an Arizona state legislature dominated by Republicans representing preponderantly white and often older suburban and rural areas. (Whites comprise 77 percent of Arizona residents older than 55 but only 43 percent of those younger than 35, the widest “racial generation gap” in any state.)

Amid a broad retrenchment in state education support since the 2007 downturn, the legislature has eliminated all state funding for the community colleges serving the two cities. In 2010, the state conscripted all of its cities into the harsh crackdown on undocumented immigrants embodied in the SB 1070 legislation that became a national flashpoint; that same year, the state legislature barred the Tucson public schools, where most students are Hispanic, from offering a Mexican American studies program that conservatives opposed. In 2014, the legislature passed a “religious freedom” bill that would have undermined Phoenix’s gay rights ordnance, though then GOP Gov. Jan Brewer vetoed it under intense national pressure.

This year, Republican Governor Doug Ducey took preemption to a new peak by signing a law that denies cities their portion of shared-state tax revenue if they pass any regulation the attorney general deems to conflict with state law. The state is now investigating whether a Tucson gun buy-back program represents such a violation, and Stanton is bracing for the state to challenge the municipal identification card the Phoenix City Council voted in August to create for undocumented immigrants. The stakes are huge: the shared state revenue accounts for one-third of Phoenix’s budget. But Stanton is prepared to fight in court if the state acts. “Do we really want a state legislator from Lake Havasu City deciding public policy for what happens here in urban Phoenix?” he told me.

Stanton is promising the same posture toward the incoming Trump Administration. Rescinding Obama’s deferred action program for children brought to the country illegally by their parents, he says, “is completely self-defeating and no city would be more hurt by that than Phoenix” (where nearly 50,000 so-called “dreamers” have received protected status.) Trump’s pledges to build a wall along the Mexican border and possibly withdraw from the North American Free Trade Agreement “would be terrible,” Stanton continues. “That’s a fast-growing economy [in Mexico]…a growing middle-class. Let’s take advantage of it. A wall would go in exactly the wrong direction.” And if Trump tries “to use the [federal] purse strings…to force our [police] officers to be part of some mass deportation unit,” Stanton says, “we’re not buying it.”

Stanton is working with Charlotte Mayor Jennifer Roberts, who faced her own high-profile state preemption struggle over trans-gender rights, to organize other mayors of blue cities in red states. “We’ve got to fight for the people of our community,” he says, “and not get pushed around.” One of the Trump era’s defining questions is whether the dynamic metropolitan areas molding the America of 2050 can continue to thrive under an insular presidential agenda aimed largely at non-urban voters who believe the U.S. was a better place in 1950.