AbstractThe first wave of globalization (1830-1914) was accompanied by a decline in the number of countries from 125 to 54. The second wave of globalization (1950-present) has led instead to an increase in the number of countries to a record high of more than 190. This paper develops a theoretical framework to study the interaction between globalization and political structure. We show that political structure adapts to expanding trade opportunities in a non-monotonic way. Borders hamper trade. In its early stages, the political response to globalization consists of removing borders by increasing country size. In its later stages, however, the political response to globalization is to remove borders by creating economic unions, and this leads to a reduction in country size.