An adapted Earth system model is used to investigate the limitations that future climate and water availability impose on the potential expansion and productivity of croplands. The model maximizes the cropland area under prevailing climate conditions and accounts for an optimized, sustainable irrigation practice, thus allowing us to consider the two-way feedback between climate and agriculture. For three greenhouse gas concentration scenarios (RCP2.6, RCP4.5, RCP8.5), we show that the total cropland area could be extended substantially throughout the 21stÂ century, especially in South America and sub-Saharan Africa, where the rising water demand resulting from increasing temperatures can largely be met by increasing precipitation and irrigation rates. When accounting for the CO.sub.2 fertilization effect, only a few agricultural areas have to be abandoned owing to declines in productivity, while increasing temperatures allow for the expansion of croplands even into high northern latitudes. Without the CO.sub.2 fertilization effect there is no increase in the overall cropland fraction during the second half of the century but areal losses in increasingly water-stressed regions can be compensated for by an expansion in regions that were previously too cold. However, global yields are more sensitive and, without the benefits of CO.sub.2 fertilization, they may decrease when greenhouse gas concentrations exceed the RCP4.5 scenario. For certain regions the situation is even more concerning and guaranteeing food security in dry areas in Northern Africa, the Middle East and South Asia will become increasingly difficult, even for the idealized scenarios investigated in this study.