A method of removing phosphorus and nitrogen from water, the method comprising: passing starting material water comprising nitrogen and phosphorus through an elevated pH phosphorus removal stage comprising: raising pH of the water to greater than or equal to 7.5 to precipitate a phosphorus salt from the water; and removing the precipitated phosphorus salt from the water; passing the water through an electrolytic nitrogen removal stage comprising passing the water through an electrolytic cell to remove nitrogen from the water as nitrogen gas; and passing the water through a galvanic phosphorus removal stage comprising immersing a galvanic cell in the water to form treated water comprising AlPO 4 that comprises phosphorus from the water, the galvanic cell comprising an anode comprising Al, a cathode having a different composition than the anode, the cathode comprising Cu, wherein no electrical potential from a source external to the galvanic cell is applied across the anode and the cathode; and separating the AlPO 4 comprising the phosphorus from the treated water via a filter that is immersed in the water and is continuously filtering the water during contact with the galvanic cell , wherein the AlPO 4 comprising the phosphorus comprises a material from the anode of the galvanic cell ; wherein the water produced by the method has a lower phosphorus concentration and a lower nitrogen concentration than the starting material water. passing starting material water comprising nitrogen and phosphorus through an elevated pH phosphorus removal stage comprising: raising pH of the water to greater than or equal to 7.5 to precipitate a phosphorus salt from the water; and removing the precipitated phosphorus salt from the water; raising pH of the water to greater than or equal to 7.5 to precipitate a phosphorus salt from the water; and removing the precipitated phosphorus salt from the water; passing the water through an electrolytic nitrogen removal stage comprising passing the water through an electrolytic cell to remove nitrogen from the water as nitrogen gas; and passing the water through a galvanic phosphorus removal stage comprising immersing a galvanic cell in the water to form treated water comprising AlPO 4 that comprises phosphorus from the water, the galvanic cell comprising an anode comprising Al, a cathode having a different composition than the anode, the cathode comprising Cu, wherein no electrical potential from a source external to the galvanic cell is applied across the anode and the cathode; and separating the AlPO 4 comprising the phosphorus from the treated water via a filter that is immersed in the water and is continuously filtering the water during contact with the galvanic cell , wherein the AlPO 4 comprising the phosphorus comprises a material from the anode of the galvanic cell ; immersing a galvanic cell in the water to form treated water comprising AlPO 4 that comprises phosphorus from the water, the galvanic cell comprising an anode comprising Al, a cathode having a different composition than the anode, the cathode comprising Cu, wherein no electrical potential from a source external to the galvanic cell is applied across the anode and the cathode; and an anode comprising Al, a cathode having a different composition than the anode, the cathode comprising Cu, wherein no electrical potential from a source external to the galvanic cell is applied across the anode and the cathode; and separating the AlPO 4 comprising the phosphorus from the treated water via a filter that is immersed in the water and is continuously filtering the water during contact with the galvanic cell , wherein the AlPO 4 comprising the phosphorus comprises a material from the anode of the galvanic cell ; wherein the water produced by the method has a lower phosphorus concentration and a lower nitrogen concentration than the starting material water. <EOS>