Male-type gut microbiota are associated with an increase in testosterone that protects mice from developing type 1 diabetes.