The prediction of peritoneal recurrence in gastric cancer patients is extremely important in preventing an unfavorable prognosis. In this prospective study, we examined the usefulness of the carcinoembryonic antigen (CEA) and cytokeratin 20 (CK20) mRNA detection in peritoneal washes as a prophylactic tool for peritoneal recurrence. Peritoneal washes were obtained from 164 patients with gastric carcinoma during a laparotomy. CEA, CK20 and glyceraldehyde-3-phosphate-dehydrogenase mRNA levels in the peritoneal washes were detected by real-time reverse transcription-polymerase chain reaction (RT-PCR) using LightCycler. Molecular detection of the CEA and CK20 mRNA in the peritoneal washes by real-time RT-PCR showed a significant correlation with tumor size, histological type, depth of invasion, lymphatic invasion, venous invasion, lymph node metastasis, peritoneal dissemination, stage and cytology. The peritoneal recurrence-free survival and overall survival rates of CEA and CK20 mRNA-positive patients were significantly worse than those of marker gene-negative patients. The CEA and CK20 mRNA levels in the peritoneal washes were a significant independent prognostic factor. In conclusion, our prospective study demonstrates that the detection of CEA and CK20 mRNA by quantitative real-time RT-PCR is a useful tool for identifying patients at high risk of peritoneal recurrence who may need adjuvant chemotherapy.