During the Neogene, the Betic Strait was one of the gateways that connected the Atlantic Ocean and the Mediterranean Sea. In this paper, we have analyzed the ostracod faunas of samples collected from sediments crossed by a long borehole in southwestern Spain. These sediments were deposited in the Betic strait just before the Messinian Salinity Crisis. During the middle Messinian (6.8-6.0 Ma), the scarce and low diversified ostracod assemblages (Krithe, Parakrithe, Henryhowella) are typical of upper bathyal palaeoenvironments (200-400 m water depth). This period includes a short transition (6.26-6.25 Ma) to outer neritic palaeoenvironments, coinciding with a glaciation and characterized by the presence of Acanthocythereis hystrix (Reuss, 1850) and the disappearance of Krithe and Parakrithe. The most abundant species have a wide biostratigraphic distribution, most of them ranging from the Tortonian until the Holocene.