The INBUILD trial investigated the efficacy and safety of nintedanib versus placebo in patients with progressive fibrosing interstitial lung diseases (ILDs) other than idiopathic pulmonary fibrosis (IPF). We aimed to establish the effects of nintedanib in subgroups based on ILD diagnosis. The INBUILD trial was a randomised, double-blind, placebo-controlled, parallel group trial done at 153 sites in 15 countries. Participants had an investigator-diagnosed fibrosing ILD other than IPF, with chest imaging features of fibrosis of more than 10% extent on high resolution CT (HRCT), forced vital capacity (FVC) of 45% or more predicted, and diffusing capacity of the lung for carbon monoxide (DLco) of at least 30% and less than 80% predicted. Participants fulfilled protocol-defined criteria for ILD progression in the 24 months before screening, despite management considered appropriate in clinical practice for the individual ILD. Participants were randomly assigned 1:1 by means of a pseudo-random number generator to receive nintedanib 150 mg twice daily or placebo for at least 52 weeks. Participants, investigators, and other personnel involved in the trial and analysis were masked to treatment assignment until after database lock. In this subgroup analysis, we assessed the rate of decline in FVC (mL/year) over 52 weeks in patients who received at least one dose of nintedanib or placebo in five prespecified subgroups based on the ILD diagnoses documented by the investigators: hypersensitivity pneumonitis, autoimmune ILDs, idiopathic non-specific interstitial pneumonia, unclassifiable idiopathic interstitial pneumonia, and other ILDs. The trial has been completed and is registered with ClinicalTrials.gov, number NCT02999178. Participants were recruited between Feb 23, 2017, and April 27, 2018. Of 663 participants who received at least one dose of nintedanib or placebo, 173 (26%) had chronic hypersensitivity pneumonitis, 170 (26%) an autoimmune ILD, 125 (19%) idiopathic non-specific interstitial pneumonia, 114 (17%) unclassifiable idiopathic interstitial pneumonia, and 81 (12%) other ILDs. The effect of nintedanib versus placebo on reducing the rate of FVC decline (mL/year) was consistent across the five subgroups by ILD diagnosis in the overall population (hypersensitivity pneumonitis 73·1 [95% CI -8·6 to 154·8]; autoimmune ILDs 104·0 [21·1 to 186·9]; idiopathic non-specific interstitial pneumonia 141·6 [46·0 to 237·2]; unclassifiable idiopathic interstitial pneumonia 68·3 [-31·4 to 168·1]; and other ILDs 197·1 [77·6 to 316·7]; p=0·41 for treatment by subgroup by time interaction). Adverse events reported in the subgroups were consistent with those reported in the overall population. The INBUILD trial was not designed or powered to provide evidence for a benefit of nintedanib in specific diagnostic subgroups. However, its results suggest that nintedanib reduces the rate of ILD progression, as measured by FVC decline, in patients who have a chronic fibrosing ILD and progressive phenotype, irrespective of the underlying ILD diagnosis. Boehringer Ingelheim.