Particularly among Democrats, this metropolitan globalism has opened a chasm between the party’s local and national leadership. In the presidential race, Bernie Sanders has unreservedly denounced free trade deals like the 12-nation Trans-Pacific Partnership that President Obama completed last year; Hillary Clinton has feebly bent in that gale, abandoning her own earlier support for the Pacific agreement. Far fewer congressional Democrats than in the 1990s are backing free trade, too.

But the nation’s mayors—most of them Democrats, especially in the larger cities— remain overwhelmingly committed to free trade in general and the Trans-Pacific Partnership in particular. The U.S. Conference of Mayors has officially endorsed the Pacific pact, and it has drawn enthusiastic praise from big-city Democratic mayors such as Atlanta’s Kasim Reed, Chicago’s Rahm Emanuel and Tampa’s Bob Buckhorn.

Buckhorn sees TPP as a chance to grow the 80,000 jobs the giant Port of Tampa already provides. The agreement enhances “our ability to sell made in America goods to largely the Far East via the Panama Canal,” Buckhorn says. “It would be foolish not to support that.” Other mayors like Emanuel see opportunities in exporting not only goods but also business services, which tend to cluster in cities—like the young software engineers congregating at 1871. Completing TPP “is essential for the architects who work here, the lawyers, the manufacturers, our software developers,” says Emanuel. “Growth for Chicago’s economy requires more markets to sell into.” Even in places where the statewide debate favors protectionism, mayors and local leaders in such cities as Columbus, Ohio, are investing in aggressive strategies to promote exports and attract foreign talent and investment.

Christopher Cabaldon, the mayor of West Sacramento, California, since 1998, remembers that when he first started attending Mayors’ Conference meetings on trade only mayors from cities with big ports or major exporters would participate. Now, cities of all sizes recognize their stake in finding their global “niche,” says Cabaldon, who chairs the Mayor’s Conference committee on jobs. So many cities, in fact, have successfully tapped global opportunities that Brookings research shows that the nation’s 100 largest metro areas account for nearly 90 percent of all U.S. exports and roughly three-fourths of jobs in foreign-owned companies. The top 118 metro areas also host 85 percent of foreign students.

These same population hubs are now increasingly indispensable to Democratic political fortunes. In 2012, Obama amassed more of his total victory margin in just his 100 best counties than any presidential winner since at least 1920. And Democrats now control the mayor’s offices in virtually all big cities—even in the reddest states.