1. Freshwater fish biodiversity is experiencing an alarming decline worldwide.Understanding the main factors behind its deterioration is a key step for ecosystem restoration. In this work, large-scale and long-term data were used to identify the causes of the decline of native species richness in Castilla-La Mancha.This region in central Spain covers part of six river basins belonging to four of the 11 biogeographical provinces for freshwater fish in the Iberian Peninsula.2. Firstly, we built a dataset that associates the presence of several fish species and a wide range of environmental variables (e.g. hydrological and hydromorphological indicators, land use classes, presence of alien fish species) at selected river sites for two different time periods (1980-2000 and 2001-2020). Secondly, we conducted an exploratory data analysis to identify possible temporal trends in the dataset. Finally, we applied the random forest algorithm to predict the response of different ecological guild-based metrics of fish richness to the selected variables.3. The exploratory data analysis revealed a decrease in native fish species richness in 74% of the area studied. There was no sustained temporal trend for stressor variables, except for the number of alien species, which increased in most river sites (63%). The models of the richness of native rheophilic, native intolerant, alien rheophilic, and alien limnophilic species performed satisfactorily. Magnitude of maximum discharge, presence of alien species, land use in the catchment area and altitude were the most important predictors of richness of native intolerant and rheophilic species. Alien limnophilic species proved to be sensitive to variables related to flow regime alteration, such as the presence of dams and the number of river flow reversals, while a less degraded habitat was found to be favourable to alien rheophilic species.4. The results suggest that the cumulative effect of persistent altered flow regimes and water pollution, coupled with a strong increase in the number of alien species, have led to the decline of native species in the area studied. The restoration This is an open access article under the terms of the Creative Commons Attribution-NonCommercial-NoDerivs License, which permits use and distribution in any medium, provided the original work is properly cited, the use is non-commercial and no modifications or adaptations are made.