Studies exploring the ecological interactions between avian influenza viruses (AIV), natural hosts and the environment are scarce. Most work has focused on viral survival and transmission under laboratory conditions and through mathematical modelling. However, more integrated studies performed under field conditions are required to validate these results. In this study, we combined information on bird community, environmental factors and viral epidemiology to assess the contribution of biotic and abiotic factors in the occurrence of low pathogenic AIV in Spanish wetlands. For that purpose, seven locations in five different wetlands were studied during two years (2007-2009), including seven sampling visits by location. In each survey, fresh faeces (n = 4578) of wild birds and water samples were collected for viral detection. Also, the vegetation structure, water physical properties of wetlands, climatic conditions and wild bird community composition were determined. An overall AIV prevalence of 1.7%±0.4 was detected in faecal samples with important fluctuations among seasons and locations. Twenty-six AIV were isolated from the 78 RRT-PCR positive samples and eight different haemagglutinines and five neuraminidases were identified, being the combination H3N8 the most frequent. Variation partitioning procedures identified the combination of space and time variables as the most important pure factor - independently to other factors - explaining the variation in AIV prevalence (36.8%), followed by meteorological factor (21.5%) and wild bird community composition/vegetation structure (21.1%). These results contribute to the understanding of AIV ecological drivers in Spanish ecosystems and provide useful guidelines for AIV risk assessment identifying potential hotspots of AIV activity. © 2012 Pérez-Ramírez et al.