This paper studies the effect of international oil prices on civil conflict in Nigeria. Our analysis uses time variation in global oil prices and cross-sectional variation based on the initial distribution of oil production across Nigerian districts. According to our estimates, an increase in oil price increases the risk of civil conflicts in districts that produce oil by at least 63 percent. Using data on intergovernmental transfers, labor outcomes and firm characteristics, the study tests for popular theoretical mechanisms of the resource curse and shows that positive oil price shocks magnify conflict through rising competition for resource rents and grievance against foreign firms. No evidence is found in favor of mechanisms related to changes in the opportunity cost of engaging in conflict.