Trophic island biogeography theory predicts that the effects of predators on prey diversity are context dependent in heterogeneous landscapes. Specifically, models predict that the positive effect of habitat area on prey diversity should decline in the presence of predators, and that predators should modify the partitioning of alpha and beta diversity across patchy landscapes. However, experimental tests of the predicted context dependency in top-down control remain limited. Using a factorial field experiment we quantify the effects of a focal predatory fish species (grouper) and habitat characteristics (patch size, fragmentation) on the partitioning of diversity and assembly of coral reef fish communities. We found independent effects of groupers and patch characteristics on prey communities. Groupers reduced prey abundance by 50% and gamma diversity by 45%, with a disproportionate removal of rare species relative to common species (64% and 36% reduction, respectively; an oddity effect). Further, there was a 77% reduction in beta diversity. Null model analysis demonstrated that groupers increased the importance of stochastic community assembly relative to patches without groupers. With regard to patch size, larger patches contained more fishes, but a doubling of patch size led to a modest (36%) increase in prey abundance. Patch size had no effect on prey diversity; however, fragmented patches had 50% higher species richness and modified species composition relative to unfragmented patches. Our findings suggest two different pathways (i.e., habitat or predator shifts) by which natural and/or anthropogenic processes can drive variation in fish biodiversity and community assembly.