Spontaneous bacterial peritonitis (SBP) is the most common and serious infection that develops in cirrhotic patients. Translocation of bacteria from their intestinal origin, alterations in immune defence mechanisms and deficiencies in the ascitic fluid antimicrobial activity seem to represent the main steps in the pathogenesis of SBP in cirrhosis. Among the factors determining the development of bacterial translocation, intestinal bacterial overgrowth (mainly related to decreased intestinal motility) and changes in the intestinal barrier appear to play an outstanding role. In conclusion, greater understanding of the pathogenesis of SBP will allow better identification of patients at high risk of developing this complication and contribute to the search for new strategies for its prevention.