Background: Sjögren's syndrome is an autoimmune disease characterised by dry eyes and mouth, systemic features, and reduced quality of life. There are no disease-modifying treatments. A new biologic, ianalumab (VAY736), with two modes of suppressing B cells, has previously shown preliminary efficacy. This dose-finding trial aimed to assess the safety and efficacy of different subcutaneous doses of ianalumab in patients with moderate to severe primary Sjögren's syndrome. Methods: VAY736A2201 was a randomised, parallel, double-blind, placebo-controlled, phase 2b dose-finding study done in 56 centres in 19 countries. Patients aged 18–75 years with primary Sjögren's syndrome with moderate to severe disease activity (European Alliance of Associations for Rheumatology [EULAR] Sjögren's Syndrome Disease Activity Index [ESSDAI] score ≥6) and symptom severity (EULAR Sjögren's Syndrome Patient Reported Index score ≥5) were eligible. Participants were randomly assigned (1:1:1:1) to receive subcutaneous placebo or ianalumab (5 mg, 50 mg, or 300 mg) every 4 weeks for 24 weeks using a secure, online randomisation system. Randomisation was stratified by the ESSDAI score at baseline (≥10 or <10). Study personnel and patients were masked to treatment assignment. The primary outcome was the change in ESSDAI score from baseline to 24 weeks in all randomly assigned patients. Dose-related change in disease activity (ESSDAI) from baseline at week 24 was assessed by multiple comparison procedure with modelling analysis. Safety was measured in all patients who received at least one dose of study drug. This trial is registered with ClinicalTrials.gov, NCT02962895. Findings: Between June 27, 2017, and Dec 06, 2018, 293 patients were screened, 190 of whom were randomly assigned (placebo n=49, ianalumab 5 mg n=47, ianalumab 50 mg n=47, ianalumab 300 mg n=47). Statistically significant dose-responses were seen for overall disease activity (ESSDAI score) in four of the five dose-response models tested (p<0·025 in four models, p=0·060 in one model). The ESSDAI score decreased from baseline in all ianalumab groups, with the maximal ESSDAI score change from baseline observed in the ianalumab 300 mg group: placebo-adjusted least-squares mean change from baseline −1·92 points (95% CI −4·15 to 0·32; p=0·092). There were four serious adverse events in three patients considered treatment-related (pneumonia [n=1] and gastroenteritis [n=1] in the placebo group; appendicitis plus tubo-ovarian abscess in the same patient in the ianalumab 50 mg group). Interpretation: The study met its primary objective, showing a dose-related decrease in disease activity as measured by ESSDAI at week 24. Overall, ianalumab was well tolerated and safe, with no increase in infections. To our knowledge, this is the first large, randomised, controlled trial in primary Sjögren's syndrome that met its primary endpoint, and its results mean there is potential for more studies of this mechanism in the future. Funding: Novartis.