The hypothesis that tetrapods evolved from elpistostegids during the Frasnian, in a predominantly aquatic context, has been challenged by the discovery of Middle Devonian tetrapod trackways predating the earliest body fossils of both elpistostegids and tetrapods. Here I present a new hypothesis based on an overview of the trace fossil and body fossil evidence. The trace fossils demonstrate that tetrapods were capable of performing subaerial lateral sequence walks before the end of the Middle Devonian. The derived morphological characters of elpistostegids and Devonian tetrapods are related to substrate locomotion, weight support and aerial vision, and thus to terrestrial competence, but the retention of lateral-line canals, gills and fin rays shows that they remained closely tied to the water. Elpistostegids and tetrapods both evolved no later than the beginning of the Middle Devonian. The earliest tetrapod records come from inland river basins, sabkha plains and ephemeral coastal lakes that preserve few, if any, body fossils; contemporary elpistostegids occur in deltas and the lower reaches of permanent rivers where body fossils are preserved. During the Frasnian, elpistostegids disappear and these riverine-deltaic environments are colonised by tetrapods. This replacement has, in the past, been misinterpreted as the origin of tetrapods.