As a consequence of the growth of the Antarctic ice-sheet during the middle Miocene, a global decrease of temperatures and an associated increase in aridity provoked several environmental changes all around the world. Such environmental variations can be detected in the continental record of the mammalian prey community structure using a synecological approach. Because of the good quality of its faunas, the rich Aragonian vertebrate fossil record from the Madrid Basin (Spain) appears as a good candidate to explore these environmental changes. In order to analyse the climatic evolution of the Iberian Peninsula associated to the Global Cooling Event, two classic palaeosynecological methodologies (cenograms and body size diversity), based on body-size community structure, were applied to 6 fossil sites from the Madrid Basin, ranging over 2 million years (15.5 -13.5 Ma). To establish a comparative framework, we used the ecological faunal data from 100 modern localities uniformly distributed all around the world. Our palaeoenvironmental inference is based on multivariate discriminant analysis of the dataset containing both modern and fossil mammals. Finally, we can conclude that the Aragonian mammalian assemblage from the Madrid Basin showed a predominance of semiarid environments with pulses of higher aridity in biozones Dc, E and F associated with the Global Cooling Event of the middle Miocene.