The investigators hypothesize that ranolazine would decrease the incidence of recurrence of AF after electrical cardioversion of persistent AF. Patients with persistent AF who are candidates for electrical cardioversion will be randomized to either placebo or ranolazine after successful electrical cardioversion. They will be followed at 2 weeks, 1, 3 and 6 months for clinical evaluation and electrocardiography for the detection of recurrence of AF.