BACKGROUND: Lyme borreliosis is the most prevalent vector-borne disease in Europe and the USA. Doxycycline for 10 days is the primary treatment recommendation for erythema migrans. To reduce potentially harmful antibiotic overuse by identifying shorter effective treatments, we aimed to assess whether oral doxycycline for 7 days is non-inferior to 14 days in adults with solitary erythema migrans. METHODS: In this randomised open-label non-inferiority trial, we enrolled patients with a solitary erythema at the University Medical Centre in Ljubljana, Slovenia. Patients were excluded if they were pregnant or lactating, immunosuppressed, allergic to doxycycline, or had received antibiotics with anti-borrelial activity within 10 days preceding enrolment or had additional manifestations of Lyme borreliosis Adults were randomly allocated 1:1 to receive oral doxycycline 100 mg twice a day for 7 days or 14 days. The primary efficacy endpoint was the difference in proportion of patients with treatment failure, defined as persistent erythema, new objective signs of Lyme borreliosis, or borrelial isolation on skin re-biopsy at 2 months, in a per-protocol analysis (the population that completed the assigned doxycycline regimen according to the study protocol and did not receive any other antibiotics with anti-borrelial activity until the 2-month visit). The non-inferiority margin was 6 percentage points. Safety was assessed in all randomly assigned patients who followed the study protocol and were evaluable at the 14-day visit. This study is registered with ClinicalTrials.gov, NCT03153267. FINDINGS: Between July 3, 2017, and Oct 2, 2018, we enrolled 300 patients (150 per group: median age 56 years [IQR 47-65]; 126 [45%] of 300 male; skin culture positive 72 [30%] of 239 assessed). 295 patients completed antibiotic therapy as per protocol and 294 (98%) patients were evaluable 2 months post-enrolment. Five (3%) of 147 patients from the 7-day group versus 3 (2%) of 147 patients from the 14-day group (one patient did not attend the 2-month visit and was unreachable by telephone) had treatment failure manifesting as persistence of erythema (difference 1·4 percentage points; upper limit of one-sided 95% CI 5·2 percentage points; p=0·64). No patients developed new objective manifestations of Lyme borreliosis during follow-up or had positive repeat skin biopsies. Two (1%) of 150 patients in the 7-day and one (1%) of 150 patients in the 14-day group discontinued therapy due to adverse events. INTERPRETATION: Our data support 7 days of oral doxycycline for adult European patients with solitary erythema migrans, permitting less antibiotic exposure than current guideline-driven therapy. FUNDING: Slovenian Research Agency and the University Medical Centre Ljubljana.