© 2016 John Wiley & Sons Ltd Background: Hospital mortality in patients with spontaneous bacterial peritonitis (SBP) is high despite albumin treatment, particularly in those with worse liver and/or renal function. Aim: To determine the independent predictive factors of in-hospital mortality and to create and validate a predictive model of mortality in patients with SBP. Methods: We analysed all cirrhotic patients with high-risk SBP (serum urea ≥11 mmol/L and/or serum bilirubin ≥68 μmol/L) between 2001 and 2011. We developed a predictive model of in-hospital mortality and validated this in a different cohort. Results: We included 118 high-risk SBP episodes treated with antibiotics and albumin. In-hospital mortality was 33/118 (28%). The independent predictive factors of in-hospital mortality at SBP diagnosis were serum urea, blood leucocyte count, Child–Pugh score and mean arterial pressure. A predictive model including these four variables showed a discrimination accuracy (AUC) of 0.850, 95% CI 0.777–0.922. A cut-off point of 0.245 showed a sensitivity of 0.85 and specificity of 0.75. The in-hospital mortality was 28/49 (57.1%) in patients with a model value ≥0.245, and 5/69 (7.2%) in patients with a model value <0.245 (P < 0.001). The validation series included 161 patients with an in-hospital mortality of 40/161 (24.8%), 30/77 (39.0%) in patients with a model value ≥0.245, and 10/84 (11.9%) in those with a model value <0.245 (P < 0.001). Conclusions: We developed and validated a predictive model of mortality that includes serum urea, blood leucocyte count, Child–Pugh score and mean arterial pressure in high-risk patients with spontaneous bacterial peritonitis. These findings may help to identify patients who would benefit from additional therapeutic strategies.