Mankind is facing a phosphorus (P) crisis. P recycling from anthropogenic waste is critical to close the P loop. Pyrolysis could be the ideal treatment for materials, such as sewage sludge, producing a safe, nutrient-rich biochar product while sequestering the inherent carbon (C). However, pyrolysed sewage sludge typically contains low levels of potassium (K) and plant available P making the material rather unsuitable for use as fertiliser. Here, a novel treatment was investigated to produce an optimised P and K biochar fertiliser. We doped sewage sludge with a low-cost mineral (2 and 5% potassium acetate) and pyrolysed it at 700°C. The percentage water-extractable of the total P content in biochar increased by 237-times with 5% K addition compared to the undoped biochar. After six water-extractions, all the K and 16% of P was obtained. Further optimisation is feasible through adjustments of the biochar pH or doping the feedstock with other forms of K. Using XANES and synchrotron XRF mapping, we identified highly soluble potassium hydrogen phosphate up to 200-300 µm below the biochar surface. This simple and cost-effective modification enables the use of sewage sludge as safe biochar fertiliser with tailored P availability that also supplies K, improves soil properties and sequesters C.