The double-blind, placebo-controlled phase of this study is designed to evaluate the efficacy and safety of oral azimilide compared with placebo and with sotalol, an antiarrhythmic drug, in maintaining sinus rhythm in patients who require cardioversion (electric shock to correct heart rhythm) to correct atrial fibrillation. Once this phase of the study is completed, a second phase with a different study design will be conducted. The second phase is an open-label, follow-up phase to the first study. The follow-up phase will continue to evaluate the long-term safety of a daily oral dose of azimilide in patients who complete the double-blind, placebo-controlled phase of this study.