In the nineteenth century, the process of European expansion led to unprecedented changes in the urban landscape outside of Europe, with the urban population moving towards the coast and tripling in size. We argue that the majority of these changes can be explained by a single innovation, the chronometer, which allowed to precisely measure longitude at sea. Identification exploits the fact that the navigation advantages provided by the chronometer were limited to offshore navigation under a cloudy sky and were therefore different across different sea regions. Using high-resolution data on climate, ship routes, and demography, we show that the chronometer led to major changes in the prevailing transoceanic sailing routes and, through this channel, affected the global distribution of cities and population and guided the expansion of the British Empire.