A phylogeny of 54 Recent and fossil species of Soritacea (Foraminifera) was used to test the hypothesis that endosymbiosis has driven the evolution of the clade. Endosymbiosis with photosynthetic eukaryotes is the plesiomorphic condition for the entire clade Soritacea. Living species dwell in tropical-subtropical, shallow-water habitats and are characterized by the possession of rhodophyte, chlorophyte, or dinophyte photosymbionts. Two distinct changes in endosymbiont type are recognized when endosymbiont type is mapped in the cladogram of Soritacea: (1) a change from rhodophyte to chlorophyte endosymbionts occurred in the stem lineage of the least inclusive clade containing New clade B, Orbiculinida, and Soritida; and (2) a change from chlorophyte to dinophyte endosymbionts occurred in the stem lineage of the least inclusive clade containing New clade G, New clade H, New clade I, Sorites, Amphisorus, and Orbitolites. When habitat and ontogeny are optimized on the cladogram of Soritida, the acquisition of dinophyte endosymbionts appears as a key innovation that facilitated a switch in habitat from free-living to attached living on nonphytal and phytal substrata. A subsequent change in the attached habitat from nonphytal to predominantly phytal (seagrasses and macroalgae) substrata is accompanied by a peramorphic trend in the megalospheric tests. The diversification (adaptive radiation) of the crown Soritida subclade resulted from the interplay between the acquisition of a key innovation (dinophyte endosymbionts) and the subsequent change in the ecology of the group (radiation to phytal substrates).