Recent studies on intraoperative radiofrequency ablation of atrial fibrillation have reported some cases of injury to the esophagus. The aim of this study was to perform computer simulations using a theoretical model in order to investigate the effect of different factors on the temperature distributions in the esophagus during ablation. A three-dimensional model was built to include an active electrode, atrial tissue, epicardial fat layer and a fragment of esophagus, aorta and lung, all linked by connective tissue. The finite-element method was used to calculate the temperature distribution during a procedure of constant-temperature ablation. The lesion geometry was assessed using a 50 degrees C isotherm. Our results show that the electrical power directly applied to the esophagus is insignificant and hence the esophageal injury is exclusively due to thermal conduction from the atrium. The esophageal lesion is mainly influenced by the thickness of connective tissue. Both the programmed target temperature of the electrode and the duration of the ablation also have a significant effect on the lesion in the esophagus. In contrast, the epicardial fat layer (0.9 mm thickness) did not show a significant influence. In conclusion, this theoretical model allows us to study the effect of different factors on the thermal injury in the esophagus during intraoperative radiofrequency ablation of atrial tissue.