The origin of illicit economies has been understood as a consequence of ‘low stateness’ (i.e. low reach of the state). Given the limited stateness in many regions, however, this article seeks to explain how only some sub-national territories have become vulnerable to illegal drug trafficking. To make this case, the representative example of the Alto Huallaga valley, in the Peruvian Amazon, is analysed. This article argues that ineffective development and settlement efforts by the Peruvian state in the Alto Huallaga, rather than the absence of the state, produced socio-ecological conditions in the region, in the late 1970s, that made it more vulnerable to the illegal economy. At the same time as international demand for illegal cocaine was expanding, two conditions resulting from frustrated state development plans came together: an enclave of poor peasants who were not self-sufficient and a natural environment impoverished by soil degradation and intensive deforestation, paradoxically not suitable for any crop except coca.