Background. The prevalence of irritable bowel syndrome (IBS), the most common functional gastrointestinal disorder, ranges from 10% to 20% in the general population. It is estimated that from 40% to 90% of persons with a diagnosis of IBS suffer from mental disorders, mainly anxiety and depressive disorders. Objectives. The aim of the study was to assess the lifetime prevalence of anxiety disorders in IBS patients and to compare it with the prevalence of these disorders in a control group of patients with gastroesophageal reflux disease (GERD). Material and Methods. The study included 106 patients with IBS and 53 patients with GERD. IBS was diagnosed according to the Rome II criteria after a basic evaluation to exclude an organic disease. Anxiety disorders were diagnosed using the Composite International Diagnostic Interview (CIDI) in accordance with ICD-10 diagnostic criteria. Results. Anxiety disorders during the patient's lifetime were diagnosed in 50 IBS patients (47%). Specific phobias occurred in 23.5% of them, social phobias in 10.4 %, generalized anxiety disorder in 10.4%, panic disorder in 3.8% and agoraphobia in 8.5%. In the control group with GERD, anxiety disorders during the subject's lifetime were diagnosed in 30% of the group. The difference in the prevalence of anxiety disorders between patients with IBS and GERD was statistically significant (p < 0.05). Conclusions. The lifetime prevalence of anxiety disorders in IBS patients was higher than in the control group with GERD (47% vs. 30%). The prevalence rate of anxiety disorders in the control group with GERD was similar to the prevalence rate in the general population.