Eligibility Criteria:
Inclusion Criteria:
* Signed informed consent before any study-related activity
* ≥ 18 years of age at the time of signing informed consent
* Body mass index (BMI) ≥ 30 kg/m2
* Body mass index (BMI) ≥ 27 kg/m2 and at least 1 concomitant cardiometabolic risk factor (hypertension, dyslipidemia, or obstructive sleep apnea)
* Symptomatic paroxysmal or early persistent atrial fibrillation (Paroxysmal AF: Self- terminating, in most cases within 48 hours up to 7 days. AF episodes that are cardioverted within 7 days with a documented 12 lead ECG showing sinus rhythm within the last 12 months; early persistent AF: AF episodes lasting longer than 7 days, including episodes that are terminated by cardioversion, either with drugs or by direct current cardioversion, after 7 days or more. Early persistent AF in this trial is defined as persistent AF with first-time electrical cardioversion (ECV) or a maximum of 1 previous ECVs.)
Exclusion Criteria:
* General exclusion criteria
* Age ≥75 years
* History of type 1 or 2 diabetes (history of gestational diabetes is allowed)
* Known or suspected hypersensitivity to study medication or related products
* Treatment with GLP-1 receptor agonists within the last 3 months before randomisation
* Treatment with dipeptidyl peptidase-4 (DPP-4) inhibitors
* Alcohol/drug abuse
* Pregnant or breastfeeding women
* Fertile women not using chemical (tablet/pill, depot injection of progesterone, sub- dermal gestagen implantation, hormonal vaginal ring or transdermal hormonal patch) or mechanical (spirals) contraceptives
* Active malignancy, unless in complete remission for ≥5 years
* Family or personal history of multiple endocrine neoplasia type 2 (MEN2) or familial medullary thyroid carcinoma (FMTC)
* Personal history of non-familial medullary thyroid carcinoma
* Inflammatory bowel diseases
* Acute or chronic pancreatitis
* Obesity induced by other endocrinologic disorders (e.g. Cushing's Syndrome)
* Current history of treatment with medications that may cause significant weight gain, within the last 3 months before screening, including systemic corticosteroids (except for a short course of treatment, i.e. 7-10 days), tri-cyclic antidepressants, atypical antipsychotic and mood stabilizers (e.g. imipramine, amitriptyline, mirtazapine, paroxetine, phenelzine, chlorpromazine, thioridazine, clozapine, olanzapine, valproic acid and its derivatives, and lithium)
* Diet attempts using herbal supplements or over-the-counter medications within 3 months before screening
* Current participation (or within the last 3 months) in an organised weight reduction programme or currently using or used within 3 months before screening: pramlintide, sibutramine, orlistat, zonisamide, topiramate, phentermine (either by prescription or as part of a clinical trial)
* Severe chronic obstructive pulmonary disease
* Uncontrolled treated/untreated hypertension (systolic \>180 mmHg and/or diastolic \>105 mmHg)
* Previous or planned surgical treatment for obesity
* Life expectancy \<2.5 years
* Other concomitant disease or treatment that according to the investigator's assessment makes the subject unsuitable for study participation
* Participation in any other clinical intervention trial
* Previous participation in the SOCRATES-AF pilot study
* Inability to sign informed consent
* Exclusion criteria related to a cardiac condition
* Previous or planned AF ablation
* Previous use of continuous prophylactic class I or III antiarrhythmic drugs
* Long-standing persistent or permanent AF
* Overall clinical history of persistent AF ≥5 years
* ECG suggestive of malignant ventricular arrhythmia
* Prolonged corrected QT-interval (\>500 ms), unless caused by bundle branch block
* Myocardial infarction (MI) within the last 3 months before screening
* Coronary revascularization within the last 3 months before screening
* Planned coronary revascularisation
* Cardiac surgery within the last 12 months before screening
* Obstructive hypertrophic cardiomyopathy
* Clinically significant valvular heart disease
* Left ventricular (LV) dysfunction (HFrEF with left ventricular ejection fraction (LVEF) \<45%) unless elicited by AF
* Hospitalization due to decompensated heart disease within 30 days prior to randomization
* Congestive heart failure (NYHA class IV)
* Current myocardial or pericardial infection
* Permanent pacemaker (PM) in use or implantable cardioverter defibrillator (ICD)
* Patient cannot be prescribed non-vitamin K oral anticoagulant (NOAC)
* perform physical exercise for medical or personal reasons
* Exclusion criteria based on laboratory abnormalities
* Liver disease with increased plasma alanine aminotransferase (ALAT) levels of more than three times the upper limit of normal
* Renal dysfunction (eGFR \<30 ml/min), dialysis or kidney transplant
* Clinically manifest thyroid dysfunction requiring therapy. After successful treatment of thyroid dysfunction, subjects may be enrolled, when thyroid function is controlled.
* HbA1c \>6.5% measured at screening