Many animals preferentially select a habitat from a range of those potentially available. However, the consequences of these preferences for distribution and abundance, and the underlying basis of habitat preferences are often unknown. The present study, conducted at Great Keppel Island, Australia, examined how distribution and abundance of an obligate corallivorous filefish, Oxymonacanthus longirostris, relates to coral architecture and diversity. The main drivers of the distribution and abundance of O. longirostris among reefs were coral species richness and availability of branching coral. Feeding territories had a higher percentage of Acropora coral than surrounding habitat. In addition, feeding territories had a higher percentage of the structurally important branching coral, Acropora nobilis, and a primary prey species, Acropora millepora. A series of pair-wise choice experiments in which both structural complexity and coral tissue quality were independently manipulated showed that habitat choice was primarily based on structural complexity and shelter characteristics. In addition, the choice for the preferred coral (A. nobilis) was stronger in the presence of a piscivorous fish. These results indicate that species-diverse coral habitats, which provide sufficient structural complexity along with nutritionally important prey, are essential for population persistence of this small, corallivorous reef fish