Urbanization is happening fast in the developing world and especially so in sub-Saharan Africa where growth rates of cities are among the highest in the world. While cities and, in particular, secondary towns, where most of the urban population in sub-Saharan Africa resides, affect agricultural practices in their rural hinterlands, this relationship is not well understood. To fill this gap, we develop a conceptual model to analyze how farmers’ proximity to cities of different sizes affects agricultural prices and intensification of farming. We then test these predictions using large-scale survey data from producers of teff, a major staple crop in Ethiopia, relying on unique data on transport costs and road networks and implementing an array of econometric models. We find that agricultural price behavior and intensification is determined by proximity to a city and the type of city.