Background: Despite the recent improvements in surgical techniques and postoperative patient care, atrial fibrillation (AF) remains the most frequent complication after cardiac surgery. Although postoperative AF is often regarded as a benign clinical condition, this arrhythmia has significant adverse effects on patient recovery and postoperative survival. Its exact pathophysiology has not yet been elucidated. The present thesis aims to analyze AF risk factors and their interaction, pre-existing histological explanatory alterations of the atrium, the AF impact on postoperative survival and the compliance of a prophylactic drug regimen. Methods: During a 10-year period, consecutive cardiac surgery cases with complete data on AF occurrence and postoperative survival were extracted. All patients were operated on for coronary or valvular surgery, with cardiopulmonary bypass (CPB). Hospital and long-term survival data were obtained from Swedish population registry. Study I) Isolated coronary artery bypass grafting (CABG, n=7056), aortic valve replacement (n=690) and their combination (n=688) were considered. Independent AF risk factors and AF effects on early and 1 year mortality were investigated. Study II) Patients affected by postoperative AF among isolated CABG patients (n=7621), valvular surgeries (n=995) and their combination (n=879) were studied. Long-term survival was obtained and prognostic factors identified. Study III) Seventy patients were randomized to on-pump (n=35) or off-pump (n=35) CABG. Samples from the right atrial appendage were collected and histology was evaluated by means of light and electronic microscopy with reference to preexistent alterations related to postoperative AF. Study IV) Cardiac surgery patients with complete data on smoking status (n=3245) were reviewed. Effects of smoking on AF development and interaction among variables were explored. Study V) CABG patients without clinical contraindications to receive oral sotalol (80 mg twice daily) and magnesium were prospectively enrolled (n = 49) and compared with a matched contemporary control CABG group (n = 844). The clinical compliance to the AF prophylactic drug regimen was tested. Results: The overall AF incidence was around 26%, subdivided into 23%, 40% and 45% for isolated CABG, valve procedures and their combined surgeries, respectively. Age was the strongest predictor of postoperative AF. Coronary disease superimposed risk factors with reference to myocardial conditions at CPB weaning. Considering the preoperative smoking condition, smokers demonstrated a reduced AF incidence compared to non-smokers (20% versus 27%, p