Variants in transmembrane protein 106 B (TMEM106B) modify the disease penetrance of frontotemporal dementia (FTD) in carriers of progranulin (GRN) mutations. We investigated whether TMEM106B is also a genetic modifier of disease in carriers of chromosome 9 open reading frame 72 (C9ORF72) expansions. We assessed the genotype of 325 C9ORF72 expansion carriers (cohort 1), 586 FTD patients lacking C9ORF72 expansions [with or without motor neuron disease (MND); cohort 2], and a total of 1,302 controls for TMEM106B variants (rs3173615 and rs1990622) using MassArray iPLEX and Taqman genotyping assays. For our primary analysis, we focused on functional variant rs3173615, and employed a recessive genotypic model. In cohort 1, patients with C9ORF72 expansions showed a significantly reduced frequency of carriers homozygous for the minor allele as compared to controls [11.9 vs. 19.1 %, odds ratio (OR) 0.57, p = 0.014; same direction as carriers of GRN mutations]. The strongest evidence was provided by FTD patients (OR 0.33, p = 0.009) followed by FTD/MND patients (OR 0.38, p = 0.017), whereas no significant difference was observed in MND patients (OR 0.85, p = 0.55). In cohort 2, the frequency of carriers homozygous for the minor allele was not significantly reduced in patients as compared to controls (OR 0.77, p = 0.079); however, a significant reduction was observed when focusing on those patients with frontotemporal lobar degeneration and TAR DNA-binding protein 43 inclusions (FTLD-TDP; OR 0.26, p < 0.001). Our study identifies TMEM106B as the first genetic factor modifying disease presentation in C9ORF72 expansion carriers. Homozygosity for the minor allele protects carriers from developing FTD, but not from developing MND; similar effects are seen in FTLD-TDP patients with yet unknown genetic causes. These new findings show that the protective effects of TMEM106B are not confined to carriers of GRN mutations and might be relevant for prognostic testing, and as a promising therapeutic target for the entire spectrum of FTLD-TDP.