The objective of this study has been to develop technologies that can reduce the content of active pharmaceutical ingredients (APIs) and bacteria from hospital wastewater. The results from the laboratory- and pilot-scale testings showed that efficient removal of the vast majority of APIs could be achieved by a membrane bioreactor (MBR) followed by ozone, ozone + hydrogen peroxide or powdered activated carbon (PAC). Chlorine dioxide (ClO2) was significantly less effective. MBR + PAC (450 mg/l) was the most efficient technology, while the most cost-efficient technology was MBR + ozone (156 mg O3/l applied over 20 min). With MBR an efficient removal of Escherichia coli and enterococci was measured, and no antibiotic resistant bacteria were detected in the effluent. With MBR + ozone and MBR + PAC also the measured effluent concentrations of APIs (e.g. ciprofloxacin, sulfamethoxazole and sulfamethizole) were below available predicted no-effect concentrations (PNEC) for the marine environment without dilution. Iodinated contrast media were also reduced significantly (80–99% for iohexol, iopromide and ioversol and 40–99% for amidotrizoateacid). A full-scale MBR treatment plant with ozone at a hospital with 900 beds is estimated to require an investment cost of €1.6 mill. and an operating cost of €1/m3 of treated water.