The aim of the study was to improve the diagnosis of pleural tuberculosis (TB) based on formalin-fixed biopsies from patients living in high TB and human immunodeficiency virus (HIV) endemic areas. A real-time polymerase chain reaction (real-time PCR) assay targeting a segment of the gene for mycobacterial 65-kd heat shock protein was developed and evaluated on pleural biopsies from 25 patients clinically diagnosed as having TB, on the basis of the good response to treatment, and from 11 controls. A nested polymerase chain reaction (N-PCR) assay for the repetitive genetic sequence insert IS6110, common to Mycobacterium tuberculosis complex organisms, was performed for comparison. When compared with N-PCR, the real-time PCR assay gave a sensitivity and specificity of 83% and 72%, respectively. When compared with clinical diagnosis, the sensitivity and specificity of real-time PCR (68% and 73%, respectively) was comparable with the sensitivity and specificity of the N-PCR assay (64% and 82%, respectively). There were no major differences in the diagnostic validity for the confirmed TB/HIV coinfected patients compared with the results from the whole TB group. In conclusion, the overall accuracy of the real-time PCR assay was comparable with that of the N-PCR and both were equally useful as diagnostic tools in the setting of a HIV coinfection. The real-time PCR has the additional advantage of a short turn-around time, low risk of sample contamination, and offers the possibility to quantify bacterial load, making it a powerful tool for the rapid diagnosis of TB pleuritis.