BACKGROUNDToll-like receptor 7 (TLR7) agonists augment immune activity and have potential for the treatment of chronic hepatitis B virus (HBV) infection. We aimed to assess the safety and tolerability of RO7020531 (also called RG7854), a prodrug of the TLR7 agonist RO7011785, in healthy volunteers and patients with chronic HBV infection.METHODSThis randomised, observer-blind, placebo-controlled, phase 1 study was done in two parts. Part 1 was done at one site in New Zealand and part 2 was done at 12 sites in Bulgaria, Hong Kong, Italy, New Zealand, the Netherlands, Taiwan, Thailand, and the UK. In part 1, healthy volunteers were randomly assigned (4:1) within one of eight dose cohorts (3 mg, 10 mg, 20 mg, 40 mg, 60 mg, 100 mg, 140 mg, or 170 mg) to receive a single RO7020531 dose or placebo or randomly assigned (4:1) within one of three dose cohorts (100 mg, 140 mg, or 170 mg) to receive either RO7020531 or placebo every other day for 13 days. In part 2, nucleoside or nucleotide analogue-suppressed patients with chronic HBV infection were randomly assigned (4:1) within cohorts 1-3 (150 mg, 150 mg, or 170 mg) to receive either RO7020531 or placebo and treatment-naive patients with chronic HBV infection were randomly assigned (3:1) in cohort 4 to receive either 150 mg of RO7020531 or placebo. Patients were treated every other day for 6 weeks. Study medication was administered orally to participants after they had fasted. Study participants and investigational staff were masked to treatment allocation. The primary outcome was the safety and tolerability of RO7020531, as measured by the incidence and severity of adverse events and the incidence of laboratory, vital sign, and electrocardiogram abnormalities, and was analysed in all participants who received at least one dose of the study medication. This trial is registered with ClinicalTrials.gov, NCT02956850, and the study is complete.FINDINGSBetween Dec 12, 2016, and March 21, 2021, 340 healthy volunteers were screened in part 1, of whom 80 were randomly assigned in the single ascending dose study (eight assigned RO7020531 in each cohort and 16 assigned placebo) and 30 were randomly assigned in the multiple ascending dose study (eight assigned RO7020531 in each cohort and six assigned placebo), and 110 patients were screened in part 2, of whom 30 were randomly assigned in cohorts 1-3 (16 assigned RO7020531 150 mg, eight assigned RO7020531 170 mg, and six assigned placebo) and 20 were randomly assigned in cohort 4 (15 assigned RO7020531 and five assigned placebo). All randomly assigned participants received at least one dose of a study drug and were included in the safety analysis. All tested doses of RO7020531 were safe and had acceptable tolerability in healthy volunteers and patients. The most frequent treatment-related adverse events among the total study population were headache (15 [9%] of 160 participants), influenza-like illness (seven [4%] of 160 participants), and pyrexia (ten [6%] of 160 participants). Most adverse events were mild and transient. There were no severe or serious adverse events in healthy volunteers. In the patient cohorts, there was one severe adverse event (influenza-like illness with 170 mg of RO7020531) and one serious adverse event (moderate influenza-like illness with a 3-day hospitalisation in a treatment-naive patient receiving RO7020531). There were no treatment-related deaths.INTERPRETATIONDue to acceptable safety and tolerability, RO7020531 should continue to be developed for the treatment of patients with chronic HBV infection.FUNDINGF Hoffmann-La Roche.