The study objective was to test the hypothesis that having histocompatible children increases the risk of rheumatoid arthritis (RA) and systemic lupus erythematosus (SLE), possibly by contributing to the persistence of fetal cells acquired during pregnancy. We conducted a case control study using data from the UC San Francisco Mother Child Immunogenetic Study and studies at the Inova Translational Medicine Institute. We imputed human leukocyte antigen (HLA) alleles and minor histocompatibility antigens (mHags). We created a variable of exposure to histocompatible children. We estimated an average sequence similarity matching (SSM) score for each mother based on discordant mother-child alleles as a measure of histocompatibility. We used logistic regression models to estimate odds ratios (ORs) and 95% confidence intervals. A total of 138 RA, 117 SLE, and 913 control mothers were analyzed. Increased risk of RA was associated with having any child compatible at HLA-B (OR 1.9; 1.2-3.1), DPB1 (OR 1.8; 1.2-2.6) or DQB1 (OR 1.8; 1.2-2.7). Compatibility at mHag ZAPHIR was associated with reduced risk of SLE among mothers carrying the HLA-restriction allele B*07:02 (n = 262; OR 0.4; 0.2-0.8). Our findings support the hypothesis that mother-child histocompatibility is associated with risk of RA and SLE.