## 5 Anaerobic Digestion: Biogas and Digestate from Pig Slurry Management  
AD is already an established, well-known, and trusted biotechnology. However, its potential is far from fully exploited. Although it is based on a complex and delicate microbial consortium [45], under appropriate operational conditions, it has demonstrated remarkable versatility and adaptability to various challenges that may arise in large-scale plants [46] and is an effective option of manure management [25; 28]. PS is regarded as a great substrate for the AD process because of its high nutritional content and variety, which produces adequate bacterial growth, buffering capacity, and ability to prevent rapid pH fluctuations inside the biodgesters [47].  
AD is a biotechnological process that works under anaerobic conditions and converts organic matter into biogas through several symbiotic interactions between microorganismisms [17; 45] also producing an effluent, named digestate, that has a potential agronomic value for use as an organic amendment [48], allowing the recovery of nutrients and assigning new economic values to AD biotechnology [2].  
Biogas could play a major role in the reduction of GHG emissions if used to replace fossil fuels. In 2011, [PERSON] and [PERSON] [25] stated that at that time AD was the only available technological solution that could both produce positive energy balances and significantly reduce GHG emissions caused by manure management. In a study conducted by [PERSON] et al. [49] where ten treatment technologies were compared for PS management, the biogas profitability of AD was notable. Methane and carbon dioxide make up the majority of biogas composition, but also other trace gases, like hydrogen sulphide, carbon monoxide, hydrogen, ammonia, oxygen, and water vapour, are present in biogas [17]. When biogas is upgraded, it produces biomethane, which can be injected into the natural gas network or used in the transport sector [27; 50].  
Many authors assume that the only main product of AD is biogas [51], and digestate is a by-product of the process. However, there is a need to shift the paradigm to consider digestate as a main product as well. There are already authors following this path. This explains the increase in studies on the improvement of the AD process by enhancing the digestate while bearing in mind nutrient recovery [1; 36].  
Digestate is one of the main products of the AD process, alongside biogas, but it is necessary to consider it in terms of its potential for other purposes, such as agronomic valorisation. As early as 1993, [PERSON] et al. [52] reported that the farm used as a case study in that work selected crops according to land application to optimise the available nutrients, while implementing a fertilisation plan based on regional soil and climate characteristics. Thirty years later, there is still a lively debate about the use of digestate for nutrient recovery and agronomic valorisation [28; 35]. While the application of digestate is undoubtedly of interest as a more sustainable option for agronomic valorisation [35] and there are already studies proving the positive effects of its application on soil quality [7; 39], it remains essential to research the best application strategy [23; 36].  
Bioavailable nutrients, particularly N, P, and K, are abundant in the digestate [1]. It is expected that compared to raw slurry, the digestate includes more accessible nitrogen (in the form of NH\({}_{4}\)+-N). Due to these qualities, the digestate can be used as a fertiliser in agriculture to improve crop productivity, soil fertility, and enhance nutrient recycling [1; 48; 53].