BACKGROUND: Children from farming families have less allergies than their peers. Consumption of farm milk or unpasteurized milk has been shown to explain (part of) the farming effect or protect against allergies independent of farming status. OBJECTIVES: We investigated whether the protective effect of farm milk consumption can be explained by higher levels of bacterial endotoxin in milk. METHODS: We measured endotoxin in approximately 400 farm milk and shop milk samples from farming and non-farming families, respectively, with the kinetic chromogenic Limulus Amebocyte Lysate test and compared endotoxin levels between groups defined by farming status and type of milk (farm milk/shop milk). RESULTS: Endotoxin levels were significantly higher in milk samples from non-farming families compared to farming families [adjusted geometric means ratio (95% confidence interval)=2.61 (1.53-4.43)]. No significant difference in endotoxin levels was found between shop milk and farm milk samples [adjusted geometric means ratio (95% confidence interval)=1.56 (0.94-2.58)]. The difference between farming and non-farming families could be explained completely for farm milk and partially for shop milk by storage conditions and temperature during transportation to the fieldworker's home. CONCLUSION: The farming effect and the effect of farm milk consumption cannot be explained by higher levels of endotoxin in milk from farmers and farm milk, respectively.