Résumé : Phosphorus and magnesium are comprised as essential resources in the European Union's list of critical raw materials. Access to those nutrients together with growing potable water demand is becoming a serious problem. Many efforts have been made to develop effective technologies for recycling water and essential nutrients from wastewater over the past few decades. Here, we present a new approach for the recovery of water simultaneously with the reclamation of Mg2+ and phosphates from secondary effluent (SE) and anaerobic digestion liquor (ADL) at WWTPs. Following the circular economy principles, our technology manages SE and produces two important products, (1) pure water (permeates) and (2) Mg-rich concentrates (by-streams/retentates), for further phosphate recovery from ADL in the form of struvite (MAP). The present study proposes an approach of combining energy-saving membrane processes (ultrafiltration (UF) and nanofiltration (NF)) with ionic exchange (IE) with the UF-NF-IE-NF-concentrates serving as a source of Mg2+ in struvite (MAP) precipitation from ADL. Different reaction conditions led to the development of typical MAP crystal forms, such as pyramids, needles, and x-shapes. The study also demonstrated that due to the low heavy metal content and narrow size distribution, the MAP generated could also be employed as a fertilizer.