The latitudinal diversity gradient, with maximum taxonomic richness in the tropics, is widely accepted as being pervasive on land, but the existence of this pattern in the sea has been surprisingly controversial. This is partly due to Thorson's influential claim that the normal latitudinal diversity gradient occurs in marine epifauna (taxa living on the surface of the substratum) but not in infauna (burrowing or boring into the substratum), a contrast he attributed to the greater spatial and temporal environmental homogeneity of infaunal habitats. In an analysis of 930 species of north-eastern Pacific marine shelf bivalves, we found that bivalves as a whole, and both infauna and epifauna separately, show a strong latitudinal diversity gradient (measured as number of species per degree latitude) that is closely related to mean sea surface temperature (SST), even in analyses of residuals and first differences. This agrees with results for marine gastropods, but contradicts Thorson's environmental homogeneity hypothesis. The relationship between SST and diversity is consistent with a species-energy hypothesis, but the linkages from SST to diversity remain unclear. Most bivalve clades within broad functional groups conform to the general latitudinal trend, except for the deposit-feeding protobranchs. This group's non-directional pattern may be related to its mode of development, because a similar effect is seen in several other groups locked into this low-fecundity, non-feeding larval mode.