This research examines theoretically and empirically the origins of agriculture. The theory highlights the role of climatic sequences as a fundamental determinant of both technological sophistication and population density in a hunter-gatherer regime. It argues that foragers facing volatile environments were forced to take advantage of their productive endowments at a faster pace. Consequently, as long as climatic shocks preserved the possibility for agriculture, differences in the rate at which foragers were climatically propelled to exploit their habitat determined the comparative evolution of hunter-gatherer societies towards farming. The theory is tested using both cross-country and cross- archaelogical site data on the emergence of farming. Consistent with the theory, the empirical analysis demonstrates that, conditional on biogeographic endowments, climatic volatility has a non-monotonic effect on the timing of the transition to agriculture. Farming was undertaken earlier in regions characterized by intermediate levels of climatic volatility, with regions subjected to either too high or too low intertemporal variability transiting later.