Ascitic fluid infection is a serious complication of liver cirrhosis. The distinction between the more common spontaneous bacterial peritonitis (SBP) and the less common secondary peritonitis in patients with liver cirrhosis is crucial due to the varying treatment approaches. This retrospective multicentre study was conducted in three German hospitals and analysed 532 SBP episodes and 37 secondary peritonitis episodes. Overall, >30 clinical, microbiological, and laboratory parameters were evaluated to identify key differentiation criteria. Microbiological characteristics in ascites followed by severity of illness and clinicopathological parameters in ascites were the most important predictors identified by a random forest model to distinguish between SBP and secondary peritonitis. To establish a point-score model, a least absolute shrinkage and selection operator (LASSO) regression model selected the ten most promising discriminatory features. By aiming at a sensitivity of 95% either to rule out or rule in SBP episodes, two cut-off scores were defined, dividing patients with infected ascites into a low-risk (score ≥ 45) and high-risk group (score < 25) for secondary peritonitis. Overall, the discrimination of secondary peritonitis from SBP remains challenging. Our univariable analyses, random forest model, and LASSO point score may help clinicians with the crucial differentiation between SBP and secondary peritonitis.