Habitat fragmentation and diversity loss due to increased conversion of natural habitats to agricultural uses influence the distribution and abundance of wildlife species and thus may change the ecology of pathogen transmission. We used hantaviruses in Panama as a research model to determine whether anthropogenic environmental change is associated with changes in the dynamics of viral transmission. Specifically, we wanted to determine whether hantavirus infection was correlated with spatial attributes of the landscape at both large and small scales or whether these changes are mediated by changes in community composition. When analyzed at coarse spatial scales, hantavirus reservoirs were more commonly found in disturbed habitats and edge habitats than in forested areas. At local scales, reservoir species dominance was significantly correlated with the slope of the terrain. To evaluate the effect of small-mammal diversity loss on infection dynamics, we implemented an experiment with selective species removal at experimental sites. Seroprevalence of hantavirus was higher in the community of small mammals and increased through time in the experimental sites. The higher seroprevalence in experimental plots suggests that greater diversity likely reduces encounter rates between infected and susceptible hosts. Our studies suggest that habitat loss and fragmentation and species diversity loss are altering hantavirus infection dynamics in Panama. Our work represents a multidisciplinary approach toward disease research that includes biodiversity concerns such as environmental change and degradation, human settlement patterns, and the ecology of host and nonhost species, work that may be especially important in tropical countries.