Background Despite inoculation into blood culture bottles, ascitic fluid culture is negative in 50% of cases of spontaneous bacterial peritonitis (SBP). Aim To determine whether 16S rDNA gene detection by real-time polymerase chain reaction (PCR) and sequencing increases the efficacy of culture in microbiological diagnosis of spontaneous bacterial peritonitis. Methods We prospectively included 55 consecutive spontaneous bacterial peritonitis episodes in cirrhotic patients, 20 cirrhotic patients with sterile ascites and 27 patients with neoplasic ascites. Ascitic fluid was inoculated into blood culture bottles at the bedside and tested for bacterial DNA by real-time PCR and sequencing of 16S rDNA gene. Results Bacterial DNA was detected in 23/25 (92%) culture-positive SBP, 16/30 (53%) culture-negative SBP (P = 0.002 with respect to culture-positive SBP), 12/20 (60%) sterile ascites (P = 0.01 with respect to culture-positive SBP) and 0/27 neoplasic ascites (P < 0.001 with respect to other groups). Sequencing identified to genus or species level 12 culture-positive SBP, six culture-negative SBP and six sterile ascites. In the remaining cases with positive PCR, sequencing did not yield a definitive bacterial identification. Conclusions Bacterial DNA was not detected in almost half the culture-negative spontaneous bacterial peritonitis episodes. Methodology used in the present study did not always allow identification of amplified bacterial DNA. © 2010 Blackwell Publishing Ltd.