In water scarce areas, like the Mediterranean Region where the lack of irrigation water is already limiting agricultural production, the valorization of non-concventional water resources is utmost important. Accordingly, in this study, we aimed to provide safe and locally sustainable ways of water supply for the Mediterranean agricultural sector by exploiting non-conventional water resources for irrigation purpose. In this context, pilot scale anaerobic reactors treating urban wastewater were operated coupling upflow anaerobic sludge blanket (UASB) reactor and ultrafiltration anaerobic membrane bioreactor (AnMBR). The resulting permeate is of high quality, accomplishing the EU quality standards for irrigation water reuse, also in terms of E.coli as the main microbial indicator. However, contaminants of emerging concern (CECs) can be a further limitation for safe reuse of the reclaimed water. Hence, molecularly imprinted polymers (MIPs) were further integrated as the final refining step for the selective removal of CECs. Diclofenac was used as the target compound with a removal efficiency up to 50% in the final effluent. In parallel, an intensive pilot system was operated for brine treatment through evaporation, chemical addition and precipitation, and forward osmosis, where up to 77% Mg2+ and 45% Ca2+ recovery rates were achieved. The recovered Mg-salts from the brine treatment were then used as an external source to enhance the struvite precipitation in the N- and P-rich effluent of AnMBR. The preliminary tests showed that only hydroxiapatite salts precipitated without any external P addition.