the Late Badenian coralline algae-vermetid reefs and the early Sarmatian serpulid-microbialite reefs distributed widely in the northeastern and eastern borders of the carpathian Foredeep Basin contain an excellent bivalve record and show how the bivalve faunas reflected the temporary closure of seaways between the Paratethys and the Mediterranean around 13.3 Ma. within the Late Badenian reefs, 116 bivalve species and three bivalve associations are recognized. After a dramatic change of environmental factors, the early Sarmatian reefs hosted 12 bivalve species, grouped in four associations. these are thought to have been controlled largely by salinity and to represent decreased and/or fluctuating salinity regimes.An integrated approach, using benthic fauna, sedimentological and isotope data, enabled interpretation of the origin of the serpulid-microbialite reefs.The changes in the palaeogeography of the Paratethys and sea-level oscillations around the Badenian/Sarmatian boundary played an important role in the distribution, extinction and radiation of the bivalves. the definitive closure of the extensive seaway connecting the Paratethys with the Mediterranean caused not only severe extinction of the bivalves inhabiting the sandy facies during the Late Badenian but also the sudden evolution and dispersal of a few opportunistic species that were ancestral forms to Sarmatian taxa. the composition of the bivalve assemblages and the ecological requirements of particular species prove the mixo-mesohaline character of the Sarmatian Sea (30–18‰) and indicate an eastward decrease in salinity.