Very few remains of elapid snakes are known from the Iberian Peninsula, but these include a probable endemic extinct species of cobra, Naja iberica from the Late Miocene. We here describe isolated cobra vertebrae from several Middle–Late Miocene localities in the Vallès‐Penedès Basin (Catalonia, Spain). All of these fossils are herein referred to an indeterminate species of the genus Naja. These remains are the first conclusive evidence that cobras were present in Iberia before the Messinian Salinity Crisis, and that they persisted there throughout the Miocene (and ultimately until the Pliocene). Recently, a phylogeny of extinct Naja based on cranial and vertebral morphology recognized N. iberica as a distinct lineage separate from the Central European one, represented mainly by Naja romani. However, due to taxonomic uncertainties, it is still unclear whether Iberian cobras were all part of a single lineage or whether several Naja lineages inhabited the Iberian Peninsula. They went extinct in Iberia before the end of the Pliocene. In the Vallès‐Penedès Basin, cobras were living in a mosaic environment, surviving through different phases characterized by different environmental features.