AbstractPoor dietary intake of vitamin B12 and folate before and during pregnancy has been associated with adverse birth outcomes. This relationship has not been rigorously evaluated in Tanzania. We performed secondary analyses of data collected during the perinatal study, a double‐blind trial that investigated the effect of vitamin supplements on perinatal outcomes in Tanzania between 2001 and 2004. In this analysis, we used log‐binomial models to investigate the adequacy of vitamin B12 and folate intake among 7633 mothers and the association of vitamin B12 and folate intake during pregnancy with low birth weight, preterm birth (PTB), small for gestational age and foetal death. Sixty‐seven percent of women had vitamin B12 intake below the recommended dietary allowances (RDAs) of 2.6 mcg for pregnant women, and 98% of women had folate intake below the RDA of 600 mcg for pregnant women. Compared with women in the lowest tertile of vitamin B12 intake women in the highest tertile were 26% less likely to have PTB (relative risk [RR] = 0.74, 95% confidence interval [CI]: 0.65, 0.84) and 36% less likely to have severe PTB (RR = 0.64, 95% CI: 0.50, 0.83). Compared with women in the lowest tertile of folate intake women in the highest tertile were 21% less likely to have PTB (RR = 0.79, 95% CI: 0.69, 0.89) and 21% less likely to have severe PTB (RR = 0.79, 95% CI: 0.69, 0.89). The provision of an adequate supply of these nutrients before and during pregnancy would improve pregnancy outcomes in Tanzania.