Most contemporary crop yield models focus on a small time window, operate on a plot location, or do not include the effects of the changing environment, which makes it difficult to use these models to assess the agricultural sustainability for past societies. In this study, adaptions were made to the agronomic AquaCrop model. This adapted model was ran to cover the last 4000 years to simulate the impact of climate and land cover changes, as well as soil dynamics, on the productivity of winter wheat crops for a Mediterranean mountain environment in SW Turkey. AquaCrop has been made spatially explicit, which allows hydrological interactions between different landscape positions, whilst computational time is kept limited by implementing parallelisation schemes on a supercomputer. The adapted model was calibrated and validated using crop and soil information sampled during the 2015 and 2016 harvest periods. Simulated crop yields for the last 4000 years show the strong control of precipitation, while changes in soil thickness following erosion, and to lesser extent re-infiltration of runoff along a slope catena also have a significant impact on crop yield. The latter is especially important in the valleys, where soil and water accumulate. The model results also show that water export to the central valley strongly increased (up to four times) following deforestation and the resulting soil erosion on the hillslopes, turning it into a marsh and rendering it unsuitable for crop cultivation.