Recent research has shown that inequality between ethnic groups is strongly driven by politics, where powerful groups and elites channel the state's resources toward their constituencies. Most of the existing literature assumes that these politically induced inequalities are static and rarely change over time. We challenge this claim and argue that economic globalization and domestic institutions interact in shaping inequality between groups. In weakly institutionalized states, gains from trade primarily accrue to political insiders and their co-ethnics. By contrast, politically excluded groups gain ground where a capable and meritocratic state apparatus governs trade liberalization. Using nighttime luminosity data from 1992 to 2012 and a global sample of ethnic groups, we show that the gap between politically marginalized groups and their included counterparts has narrowed over time while economic globalization progressed at a steady pace. Our quantitative analysis and four qualitative case narratives show, however, that increasing trade openness is associated with economic gains accruing to excluded groups in only institutionally strong states, as predicted by our theoretical argument. In contrast, the economic gap between ethnopolitical insiders and outsiders remains constant or even widens in weakly institutionalized countries.