An autoimmune component in the cause of sarcoidosis long has been debated, but population-based data on the clustering of immune-mediated diseases (IMDs) and sarcoidosis in individuals and families suggestive of shared cause is limited. Do patients with a history of IMDs have a higher risk of sarcoidosis and do IMDs cluster in families with sarcoidosis? We conducted a case-control family study (2001-2020). Patients with sarcoidosis (N= 14,146) were identified in the Swedish National Patient Register using a previously validated definition (≥ 2 International Classification of Diseases [ICD]-coded inpatient or outpatient visits). At diagnosis, patients were matched to up to 10 control participants from the general population (N= 118,478) for birth year, sex, and residential location. Patients, control participants, and their first-degree relatives (FDRs; Multi-Generation Register) were ascertained for IMDs by means of ICD codes in the Patient Register (1968-2020). Conditional logistic regression was used to estimate ORs and 95%CIs of sarcoidosis associated with a history of IMDs in patients and control participants and in FDRs. Patients with sarcoidosis exhibited a higher prevalence of IMDs compared with control participants (7.7%vs4.7%), especially connective tissue diseases, cytopenia, and celiac disease. Familial aggregation was observed across IMDs; the strongest association was with celiac disease (OR, 2.09; 95%CI, 1.22-3.58), followed by cytopenia (OR, 1.88; 95%CI, 0.97-3.65), thyroiditis (OR, 1.72; 95%CI, 1.14-2.60), skin psoriasis (OR, 1.70; 95%CI, 1.34-2.15), inflammatory bowel disease (OR, 1.53; 95%CI, 1.14-2.03), immune-mediated arthritis (OR, 1.49; 95%CI, 1.20-1.85), and connective tissue disease (OR, 1.39; 95%CI, 1.00-1.93). IMDs confer a higher risk of sarcoidosis and they aggregate in families with sarcoidosis, signaling a shared cause between IMDs and sarcoidosis. Our findings warrant further evaluation of shared genetic mechanisms.