European colonialism had two key economic aspects: the extraction of colonial wealth by colonizers, and the relevance of trade for colonial economies. I build a simple model of colonialism which puts these two elements at centre stage. By controlling policy in the colony, the colonizer can appropriate part of her wealth; the colony, however, can stage a successful revolution at a stochastic cost. I assume there is some exogenous, non-contractible policy gain from independence, so that the colonizer is forced to concede it when the cost of revolution is low. I incorporate this mechanism in a three-country, Heckscher-Ohlin model where countries (the colonizer, the colony and a third independent country) can decide whether to trade with each other, and the colonizer can threaten to stop trading with the colony if she rebels. Thus, the attractiveness of revolution and the sustainability of colonial power come to depend on the capacity of the colony to access international markets against the will of the colonizer which, in turn, depends on the distribution of world factor endowments. I present historical evidence in support of my theory. My results have important implications for the debate on the economic legacy of colonialism.