**1. Introduction**

Across Africa, agriculture is essentially rainfed; however, due to climate change and variability, precipitation is not often sufficient for crop production. Consequently, alternative sources of water need to be harnessed for crop production. The recent Intergovernmental Panel for Climate Change Report (IPCC) [1] has noted that across

Africa, temperatures will continue to increase while the pattern of precipitation will continue to be variable regionally. For example, the various Representative Concentration Pathway (RCP) scenarios show that in terms of precipitation, north Africa including Morocco and southern Africa will continue to witness declines in precipitation, especially during the growing season of crops while west, central and east Africa will witness high intensity and poorly distributed precipitation. To ensure food security for over nine billion people by 2050, agricultural production at a global scale must increase by between 70 and 100% [2]. If care is not taken, global production as per recent projections for the period 2006–2050 will decline from 2.2 to 1.1% [3]. In Africa, during the same period, the annual growth rate of food production is projected to decline from 3 to 2.1% [3]. These downward trends in crop production are likely to have devastating effects; some of these constraints are crop yield related [4–7].

Amidst these constraints imposed by climate on agriculture, across Africa and around the world, crop production has become increasingly based on water withdrawals/irrigation and fertilisation [8]. Currently, only about 15% of Moroccan agriculture is irrigated while about 85% is dependent on rainfall. Within this context of insufficient rainfall and an arid environment, crop yields are thus subjected to enormous stress [8]. Food insecurity and lagging food production in Africa are shifting attention to irrigation. Irrigation and fertilisation are among key investments and technical inputs that are needed to revamp crop production in Africa [8]. Therefore, there is an increased emphasis on the valorisation of water withdrawal and fertilisation in a bid to adapt to the limits imposed by climate change. Water withdrawal represents the total amount of water extracted from river, soil moisture, ground water and precipitation and used to enhance crop productivity. To respond to these stressors, communities, governments and other organisations across Africa are making efforts to make African agriculture resilient through sustainable withdrawal of water and fertilisation [8, 9]. Across Africa, organisations, such as the African Development Bank (AfDB), United Nations Reduction of Emissions from Deforestation and Forest Degradation (UN-REDD+) and Office Chérifien des Phosphates (OCP) Africa/Foundation, are now having programmes that aim at enhancing agriculture by the valorisation of water withdrawal and fertilisation [10–12].

Morocco is located on the North-West edge of the African continent, between latitudes 21°N and 36°N and longitudes 1°W and 17°W. The country has a total area of nearly 711,000 km<sup>2</sup> . This includes 2934 km of coast on the Atlantic Ocean to the West and 512 km of coast on the Mediterranean Sea to the North. It borders Algeria to the East and South-East and Mauritania to the South-West. According to the latest 2014 census, its population is estimated at nearly 34 million people. Morocco is characterised by a wide variety of topographies ranging from mountains and plateaus to plains, oases and Saharan dunes. For this reason, the country experiences diverse climatic conditions with large spatial intra- and inter-annual variability of precipitation. Morocco faces irregular rain patterns, cold spells and heat waves increasingly resulting in droughts, which significantly affects agriculture [13, 14].

Morocco's policy to modernise its agriculture and make it profitable for small- and medium-sized farmers and for the Moroccan economy in general is outlined in the "Green Morocco Plan" (GMP) that was established in 2008–2018 [13, 14], now replaced by the "Generation Green Plan" (GGP) to cover the next decade [15]. These plans have established goals to assist farmers to access water for agriculture as well as other agricultural inputs such as fertilisers (Agence Pour le Développement Agricole

(i.e. the Agricultural Development Agency (ADA)) [16, 17]. Invariably, these policies have had positive effects on the Moroccan agricultural economy envisioned through increased agricultural production epitomised through greater access to fertilisers, water for irrigation and increased mastery of the irrigation process.

Due to this emphasis on water withdrawal and fertilisation, research interest has also been tilted towards this direction. However, most of the studies have focused on aspects of agricultural management in the context of experimental agriculture. The goal has so far been to investigate through process-based models of how various scenarios of irrigation and fertilisation impact crop response [18–24]. To the best of our knowledge, this is the first study that uses historical data to assess recent trends in the yield of maize, barley, sorghum and wheat at a national scale in Morocco. The national scale approach adopted is essentially aspatial and seeks to provide insights into how national historical yields of the concerned crops respond to nutrient and water management. Therefore, this work assesses recent trends in the relationship between yield (dependent variable) and fertilisers (nitrogen, phosphate and potashindependent variables) on the one hand and between crop yield (dependent variable) and water withdrawals and fertilisers (independent variable) on the other. This approach is used to determine the effect that fertilisers and agricultural water withdrawal have on the selected crops to determine where emphasis can be made to improve food production. Therefore, this work seeks to assess at a national scale the recent trends in the relationships between the yields of the various crops and how they interact with aspects of nutrient and water management. This approach will improve understanding of these recent trends at the national scale. It will also go a long way in providing vital information necessary for closing yield gaps.
