The regular use of antimicrobials in livestock production selects for antimicrobial resistance. The potential impact of this practice on human health needs to be studied in more detail, including the role of the environment for the persistence and transmission of antimicrobial-resistant bacteria. During an investigation of a pig farm and its surroundings in Brandenburg, Germany, we detected abundant cephalosporin- and fluoroquinolone-resistant Escherichia coli in pig faeces, sedimented dust, and house flies (Musca domestica). Genome sequencing of E. coli isolates revealed large phylogenetic diversity and plasmid-borne extended-spectrum beta lactamase (ESBL) genes CTX-M-1 in multiple strains. [Correction added on 28 February 2023, after first online publication: In the preceding sentence, ‘and TEM-1’ was previously included but has been deleted in this version.] Close genomic relationships indicated frequent transmission of antimicrobial-resistant E. coli between pigs from different herds and across buildings of the farm and suggested dust and flies as vectors for dissemination of faecal pathogens. Strikingly, we repeatedly recovered E. coli from flies collected up to 2 km away from the source, whose genome sequences were identical or closely related to those from pig faeces isolates, indicating the fly-associated transport of diverse ESBL-producing E. coli from the pig farm into urban habitation areas. The observed proximity of contaminated flies to human households poses a risk of transmission of antimicrobial-resistant enteric pathogens from livestock to man.