Increasing vitamin D deficiency and evidence for vitamin D’s role in brain and immune function have recently led to studies of neurodevelopment; however, few are specific to autism spectrum disorder (ASD) and vitamin D in pregnancy, a likely susceptibility period. We examined this in a case-control study of 2000-2003 Southern Californian births; ASD and intellectual disability (ID) were identified through the Department of Developmental Services and controls from birth certificates (N = 534, 181, and 421, respectively, in this analysis). Total 25-Hydroxyvitamin D (25(OH)D) was measured in mid-pregnancy serum, categorized as deficient (<50 nmol/L), insufficient (50-74 nmol/L), or sufficient (≥75 nmol/L, referent category), and examined continuously (per 25 nmol/L). Crude and adjusted odds ratios (AORs) and 95% confidence intervals (95% CI) were calculated. Non-linearity was examined with cubic splines. AORs (95% CI) for ASD were 0.79 (0.49-1.3) for maternal deficiency (9.5%), 0.93 (0.68-1.3) for insufficiency (25.6%), and 0.95 (0.86, 1.05) for linear continuous 25(OH)D. Results were similarly null for ASD with or without ID, and ID only. Interactions were observed; non-Hispanic whites (NHW) (AOR = 0.82, 95% CI = 0.69-0.98) and males (AOR = 0.89, 95% CI = 0.80-0.99) had protective associations for ASD with continuous 25(OH)D. A positive association with ASD was observed in females (AOR = 1.40, 95% CI = 1.06-1.85). With splines, a non-linear inverted j-shaped pattern was seen overall (P = 0.009 for non-linearity), with the peak around 100 nmol/L; a non-linear pattern was not observed among NHW, females, nor for ID. Our findings from a large study of ASD and prenatal vitamin D levels indicate that further research is needed to investigate non-linear patterns and potentially vulnerable sub-groups. LAY SUMMARY: We studied whether mothers' vitamin D levels during pregnancy were related to their children having autism (or low IQ) later. Low vitamin D levels were not related to greater risk of autism or low IQ in children overall. With higher levels of mothers' vitamin D, risk of autism went down in boys, but went up in girls. Risk of autism also went down in children of non-Hispanic white mothers with higher vitamin D levels, but we did not find a relation in other race/ethnic groups.