Purpose: Major histocompatibility complex (MHC) genes have been widely studied in adult inflammatory bowel disease (IBD), but data on MHC genes are scarce in pediatric IBD. This study focused on MHC association of genes with pediatric-onset IBD and its different phenotypes. Methods: Blood samples of 103 patients with pediatric IBD (Crohn disease or ulcerative colitis) were collected at Children's Hospital, University of Helsinki, Finland. HLA-A, -B, -DRB1 alleles and complement C4A and C4B gene copy numbers were determined and constructed into haplotypes by a Bayesian algorithm (PHASE). A general population cohort (n = 149) served as a control. HLA-alleles and C4 deficiency frequencies were compared between patients and controls with chi(2)-squared and Fisher exact test with Bonferroni correction (P-corr). Results: One MHC haplotype HLA-A(*)03; HLA-B(*)07; 1 C4A gene; 1 C4B gene; HLA-DRB1(*)15 was more common in Crohn disease and ulcerative colitis than in controls (7/61, 11.5%, 6/42, 14.3% and 1/149, 0.7%, respectively, odds ratio (OR) = 19.19, 95% CI 2.31-159.57, P-corr = 0.004 for Crohn disease vs controls and OR = 24.67, 95% CI 2.88-211.36, P-corr = 0.002 for ulcerative colitis vs controls). Two MHC markers were associated with clinical characteristics. HLA-DRB1(*)01 was more common in patients with milder disease course, that is, no need for anti-tumor necrosis factor (TNF)-alpha medication (18/32, 56.2% vs 19/71, 26.8% without and with anti-TNF-alpha medication, respectively, OR = 0.28, 95% CI 0.12-0.68, P-corr = 0.032). C4B deficiency (C4B genes) was associated with complicated recovery after surgery (12/16, 75.0% vs 4/16, 25.0%, respectively, OR = 9.00, 95% CI 1.82-44.59, P-corr = 0.025). Conclusions: One MHC haplotype is strongly linked with pediatric-onset IBD, whereas the need for immunomodulatory therapy and surgery outcome associates with other distinct MHC gene markers.