Background: Pet ownership is consistently associated with higher indoor endotoxin concentrations, but may also be related to the amount of green space around the home. This study examined whether the association between pet ownership and higher indoor endotoxin concentrations is confounded or modified by residential greenspace. Methods: Information on pet ownership was collected at the time of recruitment of the German LISA birth cohort. Endotoxin levels were measured in settled house dust sampled from mothers' mattresses (N = 1197) and living room floors (N = 390). Greenspace around the home was assessed as the mean Normalized Difference Vegetation Index in 100 m, 500 m and 1000 m buffers around the home, and as the distance to the nearest urban and natural green space. Linear regression models assessed cross-sectional associations between pet ownership and log-transformed endotoxin levels, adjusted for known predictors of endotoxin levels. Confounding by greenspace was assessed by additionally adjusting the models for each greenspace variable. Effect modification was assessed by including interaction terms between pet ownership and each greenspace variable, and by model stratification. Results: Dog and cat ownership were associated with higher endotoxin levels in mothers' mattresses, whereas only dog ownership was associated with endotoxin levels in the floor samples. All associations were highly robust to further adjustment for greenspace, and there was little evidence to suggest any effect modification (interaction terms had p-values >0.05). Conclusions: Residential greenspace did not confound or modify the association between pet ownership and indoor endotoxin levels. Studies should continue investigating whether pets influence the indoor environment only by their presence, or also by acting as transmission vectors of the outdoors. (C) 2018 Elsevier B.V. All rights reserved.