Bioturbation is a key process in coastal sediments, influencing microbially driven cycling of nutrients as well as the physical characteristics of the sediment. However, little is known about the distribution, diversity and function of the microbial communities that inhabit the burrows of infaunal macroorganisms. In this study, terminal-restriction fragment length polymorphism analysis was used to investigate variation in the structure of bacterial communities in sediment bioturbated by the burrowing shrimp Upogebia deltaura or Callianassa subterranea. Analyses of 229 sediment samples revealed significant differences between bacterial communities inhabiting shrimp burrows and those inhabiting ambient surface and subsurface sediments. Bacterial communities in burrows from both shrimp species were more similar to those in surface-ambient than subsurface-ambient sediment (R ¼ 0.258, Po0.001). The presence of shrimp was also associated with changes in bacterial community structure in surrounding surface sediment, when compared with sediments uninhabited by shrimp. Bacterial community structure varied with burrow depth, and also between individual burrows, suggesting that the shrimp's burrow construction, irrigation and maintenance behaviour affect the distribution of bacteria within shrimp burrows. Subsequent sequence analysis of bacterial 16S rRNA genes from surface sediments revealed differences in the relative abundance of bacterial taxa between shrimp-inhabited and uninhabited sediments; shrimp-inhabited sediment contained a higher proportion of proteobacterial sequences, including in particular a twofold increase in Gammaproteobacteria. Chao1 and ACE diversity estimates showed that taxon richness within surface bacterial communities in shrimp-inhabited sediment was at least threefold higher than that in uninhabited sediment. This study shows that bioturbation can result in significant structural and compositional changes in sediment bacterial communities, increasing bacterial diversity in surface sediments and resulting in distinct bacterial communities even at depth within the burrow. In an area of high macrofaunal abundance, this could lead to alterations in the microbial transformations of important nutrients at the sediment-water interface.