Since the early twentieth century, the history of Japan's commercial harbors has been inseparable from the history of the global economy. This intimate relationship has made overseas commerce a powerful force in shaping civic discourse in these ports, profoundly influencing how these cities saw themselves within a larger world. However, the scholarship on modern Japanese urbanism ignores the inseparability of civic narratives in these harbors from their international trade. This literature maps urban identity formation onto a national framework, portraying local identities as a response to narratives from Japan's political center that were chiefly shaped by domestic forces and ultimately subservient to national loyalties. My dissertation challenges this literature by arguing that a fundamental reliance on overseas markets made global economic crises an indelible part of identity formation in Japan's commercial harbors. Using the ports of Yokohama, Tsuruga, and Nagasaki as case studies, I argue that local elites in these cities responded to international crises during Japan's interwar period (1918-1941) by creating flexible urban identities that simultaneously accommodated local pride, militant nationalism, and "international community" based on whichever was deemed most beneficial to local economic development. The interplay of these seemingly contradictory intellectual strands was not a zero-sum ideological contest. Instead, local elites reconciled these competing ideas by marketing their ports as Japan's "gateways to the world," a malleable idea that oscillated between calls for city-first policies, liberal internationalism, and imperial autarky in the face of wrenching changes to the international order. Understanding this process of identity formation not only transforms how we narrate Japan's urban history, but is also essential to a fuller understanding of how urban communities throughout Asia make sense of locality, nation, and world in a globalized economy.