In contrast to dominant mode of ecological transition in the evolution of marine mammals, different lineages of toothed whales (Odontoceti) have repeatedly invaded freshwater ecosystems during the Cenozoic era. The so-called 'river dolphins' are now recognized as independent lineages that converged on similar morphological specializations (e.g., longirostry). In South America, the two endemic 'river dolphin' lineages form a clade (Inioidea), with closely related fossil inioids from marine rock units in the South Pacific and North Atlantic oceans. Here we describe a new genus and species of fossil inioid, Isthminia panamensis, gen. et sp. nov. from the late Miocene of Panama. The type and only known specimen consists of a partial skull, mandibles, isolated teeth, a right scapula, and carpal elements recovered from the Piña Facies of the Chagres Formation, along the Caribbean coast of Panama. Sedimentological and associated fauna from the Piña Facies point to fully marine conditions with high planktonic productivity about 6.1-5.8 million years ago (Messinian), pre-dating the final closure of the Isthmus of Panama. Along with ecomorphological data, we propose that Isthminia was primarily a marine inhabitant, similar to modern oceanic delphinoids. Phylogenetic analysis of fossil and living inioids, including new codings for Ischyrorhynchus, an enigmatic taxon from the late Miocene of Argentina, places Isthminia as the sister taxon to Inia, in a broader clade that includes Ischyrorhynchus and Meherrinia, a North American fossil inioid. This phylogenetic hypothesis complicates the possible scenarios for the freshwater invasion of the Amazon River system by stem relatives of Inia, but it remains consistent with a broader marine ancestry for Inioidea. Based on the fossil record of this group, along with Isthminia, we propose that a marine ancestor of Inia invaded Amazonia during late Miocene eustatic sea-level highs.