Turtles have a highly modified body plan, including a rigid shell that constrains
postcranial anatomy. Skull morphology and neck mobility may therefore be key to ecological
specialization in turtles. However, the ecological signal of turtle skull morphologies
has not been rigorously evaluated, leaving uncertainties about the roles of ecological
adaptation and convergence. We evaluate turtle cranial ecomorphology using three-dimensional
geometric morphometrics and phylogenetic comparative methods. Skull shape correlates
with allometry, neck retraction capability, and different aquatic feeding ecologies.
We find that ecological variables influence skull shape only, whereas a key functional
variable (the capacity for neck retraction) influences both shape and size. Ecology
and functional predictions from three-dimensional shape are validated by high success
rates for extant species, outperforming previous two-dimensional approaches. We use
this to infer ecological and functional traits of extinct species. Neck retraction
evolved among crownward stem-turtles by the Late Jurassic, signaling functional decoupling
of the skull and neck from the shell, possibly linked to a major episode of ecomorphological
diversification. We also find strong evidence for convergent ecological adaptations
among marine groups. This includes parallel loss of neck retraction, evidence for
active hunting, possible grazing, and suction feeding in extinct marine groups. Our
large-scale assessment of dietary and functional adaptation throughout turtle evolution
reveals the timing and origin of their distinct ecomorphologies, and highlights the
potential for ecology and function to have distinct effects on skull form.