SUMMARY1. Pesticides can have strong deleterious impacts in fresh waters, but understanding how these effects cascade through natural ecosystems, from microbes to apex predators, is limited because research that spans multiple levels of biological organisation is rare. 2. We report how an accidental insecticide spill altered the structure and functioning of a river across levels ranging from genes to ecosystems. We quantified the impacts on assemblages of microbes, diatoms, macroinvertebrates and fish and measured leaf-litter decomposition rates and microbial functional potential at upstream control and downstream impacted sites 2 months after the spill. 3. Both direct and indirect impacts were evident across multiple levels of organisation and taxa, from the base of the food web to higher trophic levels. At the molecular level, differences in functional gene abundance within the impacted sites reflected a combination of direct and indirect effects of the pesticide, via elevated abundances of microbial populations capable of using chlorpyrifos as a resource (i.e. direct effect) and oxidising ammonia released by decaying macroinvertebrate carcasses (i.e. indirect effect). 4. At the base of the food chains, diatom taxa found only in the impacted sites were an order-ofmagnitude larger in cell size than the largest comparable taxa in control communities, following the near extirpation of their consumers. Population biomass of the key detritivore Gammarus pulex was markedly lower, as was the rate of litter decomposition in the impacted sites. This was partially compensated for, however, by elevated microbial breakdown, suggesting another indirect food-web effect of the toxic spill. 5. Although many species exhibited population crashes or local extirpation, total macroinvertebrate biomass and abundance were largely unaffected due to a compensatory elevation in small tolerant taxa such as oligochaetes, and/or taxa which were in their adult aerial life stage at the time of the spill (e.g. chironomids) and thus avoided contact with the polluted waters and were able to repopulate the river quickly. Mass-abundance scaling of trophic links between consumers and resources revealed extensive restructuring within the food web. 6. This case study shows that pesticides can affect food-web structure and ecosystem functioning, both directly and indirectly across levels of biological organisation. It also demonstrates how an integrated assessment approach, as adopted here, can elucidate links between microbiota,