We use new, comprehensive micro data on oil fields to build and estimate a structural model of the oil industry embedded in a general equilibrium model of the world economy. In the model, firms that belong to OPEC act as a cartel. The remaining firms are a competitive fringe. We use the model to study the macroeconomic impact of the advent of fracking. Fracking weakens the OPEC cartel, leading to a large long-run decline in oil prices. Fracking also reduces the volatility of oil prices in the long run because fracking firms can respond more quickly to changes in oil demand.