-Fernández, J. Infante-Amate, and M. González de Molina. 2018. The agrarian metabolism as a tool for assessing agrarian sustainability, and its application to Spanish agriculture ABSTRACT. Agrarian metabolism applies the social metabolism framework to agriculture. It focuses on the study of the exchange of material and energy flows between a society and its environment for producing useful biomass. These flows must maintain the fund elements of the agroecosystem in sufficient quantity and of sufficient quality for them to continue providing ecosystem services. This methodology was applied to Spanish agriculture between 1960 and 2008, a period characterized by a deep process of intensification based on external inputs (EIs). We specifically focused on nitrogen (N), phosphorus (P), potassium (K), carbon (C), and energy flows, and on the three fund elements that they sustain such as soil, biodiversity, and woodland. The results show that the growing incorporation of EIs has broken the equilibrium between land and biomass uses required by traditional farming, lowering the density of internal energy loops. On cropland, the relative fall in unharvested biomass had a negative effect on both biodiversity and the soil, which reduced the replenishment of organic C between 1960 and 1990. The sharp increase in internal and external flows of biomass for animal feed hardly contributed to increasing soil organic carbon (SOC) between 1990 and 2008 because of the fact that these flows had increasingly lower C:N ratios. The massive importation of N in feed and mineral fertilizers (553 and 1150 Gg in 2000, respectively) increased the surplus and the losses of N, which in turn could have a negative impact on biodiversity, water, and the atmosphere. The scenario constructed without imported animal feed would allow a reduction in the environmental impacts related to the excess of N, with hardly any negative effect on SOC replenishment, and improving energy return rates in the form of total, unharvested, and accumulated phytomass.