Obesity, diabetes, and metabolic syndrome result from complex interactions between genetic and environmental factors, including the gut microbiota. To dissect these interactions, we utilized three commonly used inbred strains of mice - obesity/diabetes-prone C57Bl/6J mice, obesity/diabetes-resistant 129S1/SvImJ from Jackson Laboratory, and obesity-prone but diabetes-resistant 129S6/SvEvTac from Taconic - plus three derivative lines generated by breeding these strains in a new, common environment. Analysis of metabolic parameters and gut microbiota in all strains and their environmentally normalized derivatives revealed strong interactions between microbiota, diet, breeding site, and metabolic phenotype. Strain-dependent and strain-independent correlations were found between specific microbiota and phenotypes, some of which could be transferred to germ-free recipient animals by fecal transplantation. Environmental reprogramming of microbiota resulted in 129S6/SvEvTac becoming obesity resistant. Thus, development of obesity/metabolic syndrome is the result of interactions between gut microbiota, host genetics, and diet. In permissive genetic backgrounds, environmental reprograming of microbiota can ameliorate development of metabolic syndrome.