We studied the reproductive ecology of the bat fly Basilia nana on free-ranging colonial female and solitary male Bechstein's bats (Myotis bechsteinii) during one reproductive season. The reproduction of B. nana took place from April to September, and the production of puparia in bat roosts was high. The metamorphosis of the flies took a minimum of 30 days, and at least 86% of the puparia metamorphosed successfully. However, only about 30% of flies from puparia deposited in female roosts and 57% of flies from puparia deposited in male roosts emerged in the presence of Bechstein's bats and were thus able to survive. The significantly higher emergence success of bat flies in male roosts was caused by the higher roost fidelity of the solitary males compared with the social females. Our results indicate that bats can control the reproductive success of bat flies by switching and selecting roosts.