Alkali (NaOH) hydrolysis and low-temperature thermal treatment were applied to digested sludge for the recovery and release of PO43- and NH4+. The Box-Behnken design was applied in the hydrolysis using 0.5M NaOH for the optimization of the conditions that affect the nutrients and metal release from digested sludge. PO43- release was positively associated with decreasing liquid/solid ratio and increasing temperature. Moreover, Ca, Fe, and Zn releases also increase with increasing temperature. However, the temperature did not have any effect on NH4+ release. An optimal condition for the release of nutrients and metals was obtained at a liquid/solid ratio of 10/1 (mL/g), a temperature of 40 degrees C, and a reaction time of 40 min. In this optimal condition, the concentrations of PO43- and NH4+ released were 921.00 and 819.15 mg/L, respectively. The removal rates of PO43- and NH4+ from hydrolyzed sludge liquid by struvite crystallization were 95.27% and 77.95% in this condition. Struvite obtained had low Ca, Fe, and Al content. The produced struvite meets the legal limits for fertilizer use in terms of Cd, Cu, Ni, Pb, Zn, Hg, and Cr content specified by Turkish regulations.