Food habits of the endangered gray myotis (Myotis grisescens) were ascertained from 10,736 fecal pellets collected from 1,225 bats of known sex, age, reproductive condition, and capture locations, including 5 maternity caves and 2 dispersal caves in Missouri. Diets were compared to availability of insects in 80 light-trap samples collected concomitantly with fecal samples. Proportional availability of insects varied among locations, over the season, between seasons, and between early-evening and late-night samples. Similarly, the diet varied among locations, over time, between early and late samples, and among sample groups by sex, age, and reproductive condition. Trichopterans, coleopterans, and lepidopterans were important in the diet and in light-trap samples, but there was poor correlation between corresponding diet and light-trap samples. Plecopterans, ephemeropterans, and dipterans were occasionally common in light-trap and dietary samples, although again there was poor correlation between corresponding diet and light-trap samples. Gray myotis forage individually over long distances along streams and wooded riparian habitats. Although this habitat produces a characteristic assemblage of insect prey, proportional availability varies temporally and spatially. Thus, although specific diet samples do not match corresponding insect samples, on a broader scale, diets and insect availability do correspond. On a microscale, the gray myotis exhibited some characteristics of an opportunistic forager, feeding on readily available prey, but on a macroscale was selective, feeding in aquatic-based habitats where specific types of insect prey were abundant. Juveniles foraged more in woodlands and ate more coleopterans, which may provide a greater energy reward per unit of capture effort, than did adults. Conservation efforts should include both aquatic and wooded riparian habitats.