Ioar Guzman

Paula Altieri

Arturo Elosegi

Ana Victoria Pérez-Calpe

Daniel Schiller

Jose M González

Mario Brauns

José M Montoya

Aitor Larrañaga

Ioar De Guzman
email: mirenioar.deguzman@ehu.eus

Daniel Von Schiller

Water diversion and pollution interactively shape freshwater food webs through bottom-up mechanisms

Keywords: Food web, water diversion, pollution, food web complexity, bottom-up mechanisms

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

The rising global human population and the intensification of economic activities have increased the demand for water [START_REF] Crist | The interaction of human population, food production, and biodiversity protection[END_REF][START_REF] Ripple | World Scientists' Warning to Humanity: A Second Notice[END_REF], which is projected to increase over 50% by 2050 [START_REF] Leflaive | Water Outlook to 2050: The OECD calls for early and strategic action[END_REF]. In order to satisfy water demand for agriculture, industry and domestic use [START_REF] Albert | Scientists' warning to humanity on the freshwater biodiversity crisis[END_REF], rivers are increasingly being regulated by barriers, most of them built to control and divert water flow, with weirs (30.5%) and dams (9.8%) as the most frequently built structures [START_REF] Belletti | More than one million barriers fragment Europe's rivers[END_REF]. These barriers disrupt connectivity across the fluvial network affecting dispersion of aquatic organisms [START_REF] Brooks | Barriers to dispersal: The effect of a weir on stream insect drift[END_REF][START_REF] Jones | Impacts of artificial barriers on the connectivity and dispersal of vascular macrophytes in rivers: A critical review[END_REF] and community structure [START_REF] Carpenter-Bundhoo | Effects of a low-head weir on multi-scaled movement and behavior of three riverine fish species[END_REF][START_REF] Munasinghe | Impacts of streamflow alteration on benthic macroinvertebrates by mini-hydro diversion in Sri Lanka[END_REF]. Water diversion driven by these infrastructures results in strong habitat contraction [START_REF] Rolls | Mechanistic effects of low-flow hydrology on riverine ecosystems: ecological principles and consequences of alteration[END_REF], or even total loss of surface water flow [START_REF] Steward | When the river runs dry: human and ecological values of dry riverbeds[END_REF][START_REF] Schiller | Nutrient and Organic Matter Dynamics in Intermittent Rivers and Ephemeral Streams[END_REF]. This also affects community composition [START_REF] Stubbington | Low flow controls on benthic and hyporheic macroinvertebrate assemblages during supra-seasonal drought[END_REF], as ecosystem size is an important determinant of food web structure on freshwater ecosystems [START_REF] Mchugh | Habitat size influences food web structure in drying streams[END_REF][START_REF] Mcintosh | Capacity to support predators scales with habitat size[END_REF]. Moreover, water diversion can alter the availability of basal food resources in rivers [START_REF] Power | Food webs in Mediterranean rivers[END_REF]. For instance, coarse detritus is reduced in the diverted sections compared to the upstream reaches due to its retention in the impoundments [START_REF] Schmutz | Dams: Ecological Impacts and Management[END_REF] and the transport through the diversion canals [START_REF] Arroita | Impact of water abstraction on storage and breakdown of coarse organic matter in mountain streams[END_REF]. Alterations in the availability of basal food resources modify river food webs through bottom-up mechanisms [START_REF] Biggs | Trophic cascades in streams: effects of nutrient enrichment on autotrophic and consumer benthic communities under two different fish predation regimes[END_REF][START_REF] Wallace | Multiple Trophic Levels of a Forest Stream Linked to Terrestrial Litter Inputs[END_REF] and thus, modify energy and matter transfer from detritus or primary producers reshaping brown or green food webs, respectively.

Water diversion is usually accompanied by other stressors that simultaneously affect river ecosystems [START_REF] Ormerod | Multiple stressors in freshwater ecosystems[END_REF][START_REF] Sabater | Multiple Stressors in River Ecosystems: Status, Impacts and Prospects for the Future[END_REF]. Multiple stressors often interact in an unpredictable way [START_REF] Casas | The effect of a headwater dam on the use of leaf bags by invertebrate communities[END_REF][START_REF] Jackson | Net effects of multiple stressors in freshwater ecosystems: a meta-analysis[END_REF][START_REF] Orr | Towards a unified study of multiple stressors: divisions and common goals across research disciplines[END_REF] and generate complex effects by amplifying or lessening the single effect of each stressor, which depends not only on the interaction strength but also on the direction of the interaction [START_REF] Piggott | Reconceptualizing synergism and antagonism among multiple stressors[END_REF]. Pollution is one of the most pervasive stressors in freshwater ecosystems [START_REF] Malmqvist | Threats to the running water ecosystems of the world[END_REF][START_REF] Reid | Emerging threats and persistent conservation challenges for freshwater biodiversity[END_REF] and appears frequently in conjunction with other stressors [START_REF] Dolédec | Multiple stressors shape invertebrate assemblages and reduce their trophic niche: A case study in a regulated stream[END_REF]. Depending on their effects on biota, pollutants can be toxic (if they reduce biological activity at any concentration) or assimilable (if they subsidise biological activity at low concentrations but become toxic at high concentrations) [START_REF] Odum | Perturbation Theory and the Subsidy-Stress Gradient[END_REF].

Nutrient pollution in aquatic systems, generally refers to the concentration of different forms of nitrogen (N) and phosphorous (P) [START_REF] Schweitzer | Water Contamination and Pollution[END_REF], which frequently limit primary production [START_REF] Elser | Global analysis of nitrogen and phosphorus limitation of primary producers in freshwater, marine and terrestrial ecosystems[END_REF][START_REF] Tank | Nutrient limitation of epilithic and epixylic biofilms in ten North American streams[END_REF]. Thus, enrichment of freshwaters with N and P can eliminate nutrient limitation of algal communities [START_REF] Marcarelli | Nutrient limitation of biofilm biomass and metabolism in the Upper Snake River basin, southeast Idaho, USA[END_REF] and increase biofilm biomass [START_REF] Keck | Can we predict nutrient limitation in streams and rivers?[END_REF]. These changes in biofilm biomass increase initial energy flow [START_REF] Canning | The influence of nutrient enrichment on riverine food web function and stability[END_REF] and can be propagated towards higher trophic levels [START_REF] Ardón | Experimental nitrogen and phosphorus enrichment stimulates multiple trophic levels of algal and detrital-based food webs: a global meta-analysis from streams and rivers[END_REF] altering food web structure and increasing trophic diversity [START_REF] García | Effects of landuse intensification on stream basal resources and invertebrate communities[END_REF]. In addition, as the energy loss within each trophic transfer limits species population size at high trophic levels [START_REF] Hutchinson | Homage to Santa Rosalia or Why Are There So Many Kinds of Animals?[END_REF][START_REF] Pimm | Food webs, in: Food Webs[END_REF], more productive ecosystems, which are not facing toxic consequences of eutrophication, should allow longer food chains. The main cause for this is that energy can more easily reach higher trophic levels [START_REF] Pimm | Food webs, in: Food Webs[END_REF][START_REF] Schoener | Food Webs From the Small to the Large: The Robert H. MacArthur Award Lecture[END_REF] by narrowing the stoichiometric gap between consumers and their food resources [START_REF] Mulder | Soil acidity, ecological stoichiometry and allometric scaling in grassland food webs[END_REF]. Thus, longer food chains can be a product of a greater dietary generalism, which increases the trophic position of predators [START_REF] O'gorman | Multiple anthropogenic stressors and the structural properties of food webs[END_REF].

There are a number of studies on the isolated effects of water diversion and water pollution on food web structure (e.g. [START_REF] Boddy | Big impacts from small abstractions: The effects of surface water abstraction on freshwater fish assemblages[END_REF][START_REF] Walters | An experimental disturbance alters fish size structure but not food chain length in streams[END_REF][START_REF] Walters | An experimental disturbance alters fish size structure but not food chain length in streams[END_REF][START_REF] García | Effects of landuse intensification on stream basal resources and invertebrate communities[END_REF][START_REF] Morrissey | Stable isotopes as indicators of wastewater effects on the macroinvertebrates of urban rivers[END_REF][START_REF] Price | Land use alters trophic redundancy and resource flow through stream food webs[END_REF]. There are even a few studies that have addressed the joint effects of nutrient pollution and water diversion (e.g. [START_REF] Lange | Responses of stream fish populations to farming intensity and water abstraction in an agricultural catchment[END_REF] or flow reduction, a consequence of water diversion (e.g. [START_REF] Elbrecht | Multiple-stressor effects on stream invertebrates: a mesocosm experiment manipulating nutrients, fine sediment and flow velocity[END_REF][START_REF] Matthaei | Multiple stressors in agricultural streams: interactions among sediment addition, nutrient enrichment and water abstraction[END_REF] on river biota and functioning. Nevertheless, there is still a lack of studies assessing the effects of both stressors on the structure of food webs. Thus, the aim of this study is to assess the isolated and interactive effects of water diversion and water pollution on river food webs and trophic niche distribution. We hypothesise that (Figure 1): 1) Water diversion will affect different dimensions of food web complexity in different ways.

We expect that both the stock of coarse detritus and its contribution to the diet of primary consumers will decrease in diverted reaches, with a consequent increase in trophic diversity and a reduction of trophic redundancy by feeding more on the less abundant biofilm.

However, reduced stock of basal resources will reduce food chain length (FCL).

2) Moderate pollution will increase food web complexity. We expect biofilm production and its contribution to the diet of primary consumers to increase with nutrients from moderately polluted waters, leading to an increase in FCL and trophic diversity.

3) The interaction between water diversion and pollution will increase even further food web complexity, as the reduction of coarse detritus stock will be accompanied by a larger biofilm availability. Consequently, the combination of water diversion and pollution will raise trophic diversity and reduce redundancy even further.

With this purpose, we analysed carbon and nitrogen stable isotopes, which provide a timeintegrated measurement of trophic structure and interactions by elucidating the relative trophic positions of species in the food web (nitrogen isotope) and the relative contribution of different basal resources to the consumers (carbon isotope) [START_REF] Peterson | Stable isotopes in ecosystem studies[END_REF][START_REF] Phillips | Converting isotope values to diet composition: the use of mixing models[END_REF].

Materials and methods

Sampling design and study sites

We selected four rivers within the temperate region of the northern Iberian Peninsula, which differed in their ecological status and water quality [START_REF] Aguirre | Red de seguimiento del estado biológico de los ríos de la CAPV[END_REF] (Table 1). None of the selected rivers showed a bad ecological status, which indicates that the pollution ranged from low to moderate. The cover and maturity of the riparian forests also differed between rivers (higher in Urumea and Leitzaran than in Kadagua and Deba), which was inversely related to the level of urbanisation (Table 1). The four rivers had a similar water diversion scheme, consisting of a low weir (3-6.5 m high) and a canal that can divert up to 90% of the river flow to hydropower. We defined two 100 m-long reaches in each river: a control reach upstream from the stagnant water retained by the weir and a diverted reach in the bypassed section immediately downstream from the weir.

Baseline data on water characteristics and basal resources

To set the baseline status of each river and include variability of water diversion and non-diversion periods, available information on water characteristics and basal food resources of three sampling campaigns (late spring of 2017, autumn of 2017 and late spring of 2018) were gathered. Water characteristics differed among rivers, but they were unaffected by water diversion (Table S1). According to the pollution gradient (Table 2, which comprehended a wide range of pollutants apart from nutrients (see [START_REF] Aguirre | Red de seguimiento del estado biológico de los ríos de la CAPV[END_REF], but was represented in our study by the Total Dissolved Nitrogen (TDN) gradient), Urumea was the least polluted river, followed by Leitzaran, Kadagua and Deba. This gradient correlated with the concentrations of most solutes, pH, conductivity, and temperature (Table S1, Figure S1). Although we are aware that water nitrogen content was not the only driver shaping food webs and that the other physicochemical variables (e.g. temperature, oxygen or water flow) might also play a role, water TDN served as an effective surrogate when representing pollution in our systems. During these sampling campaigns, mean discharge and mean wet width showed a reduction (from 39.2% to 68.9% and from 4.6% to 25.9% respectively) downstream from the weirs (Table 2 ) [molybdate method [START_REF] Murphy | A modified single solution method for the determination of phosphate in natural waters[END_REF]] and ammonium (NH 4 + , µg N L -1

) [salicylate method [START_REF] Reardon | New reactants for the colorimetric determination of ammonia[END_REF]]. Dissolved organic carbon (DOC, mg C L -1

) and total dissolved nitrogen (TDN, mg N L -1

) were measured by catalytic oxidation (Shimadzu TOC-L analyser coupled to a TNM-L unit).

We compiled the available information on the main basal food resources, to characterize the accessible food resources for the benthic community in each river and reach. Coarse detritus was collected by means of a Surber sampler (0.09 m 2 ), and the organic matter retained on an 8-mm sieve was processed.

Nine benthic samples were randomly collected in each reach on the aforementioned sampling campaigns. Information on fine detritus from two sampling campaigns (late spring and autumn 2017)

was also gathered for each reach. Nine samples were randomly collected per reach in each sampling campaign using a sediment corer (surface 81.7 cm 2 ). Both types of organic matter samples were ovendried (70°C, 72h) and combusted (500°C, 4h) to determine their ash free dry mass (AFDM, g m -2 ).

Information on biofilm biomass was gathered from a single sampling campaign in late spring of 2018, which was measured by means of a BenthoTorch fluorometer (Bentho Torch, bbe-Moldaenke, Germany) on 18 cobbles per reach. For details regarding the collected data, see de [START_REF] De Guzman | Dataset: Water diversion and pollution interactively shape freshwater food webs through bottom-up mechanisms[END_REF].

Stable isotope analysis

A single food-web sampling campaign for stable isotope analysis (SIA) was carried out during late spring of 2018, a period when the flow differences between upstream and downstream reaches from dams are greatest because of low precipitations but still active diversion canals. All the available basal food resources were collected from each reach: biofilm, fine detritus and leaves of alder (Alnus glutinosa (L.)

Gaertn) were present in every river and reach, while the gathering of filamentous green algae, bryophytes and macrophytes varied from reach to reach. Other basal resources, such as phytoplankton,

were not collected due to their extremely low abundance in these river sections. Six composite samples of biofilm were collected in each reach by scrapping the whole surface of nine cobbles and collecting the slurry in filtered river water (0.7 µm pore size, Whatman GF/F). The remaining resources were individually gathered from the riverbed. Alder leaves found on the riverbed were collected as a representative of coarse detritus since they were the dominant leaf type found in these reaches. Alder leaves are a nutrient poor basal food resource compared to autochthonous resources [START_REF] Cross | Ecological stoichiometry in freshwater benthic systems: recent progress and perspectives[END_REF]; although, they show a relatively higher content of nutrients compared to leaf-litter of other woody plants [START_REF] Kang | Global pattern of leaf litter nitrogen and phosphorus in woody plants[END_REF]. Macroinvertebrates were collected with a kick sampler (0.5 mm mesh aperture) in six transects along each reach. The six most common, but trophically diverse genera were collected after sorting and identifying them in the field: Baetis, Ecdyonurus, Echinogammarus, Ephemerella, Hydropsyche and Rhyacophila. Up to nine invertebrate samples per taxon were collected in each reach, each sample containing from one to 55 individuals depending on their body mass. When possible, the digestive tracts of the predators were removed, since gut contents can affect the isotopic signature of the sample [START_REF] Mateo | Effects of sample preparation on stable isotope ratios of carbon and nitrogen in marine invertebrates: implications for food web studies using stable isotopes[END_REF]. S2). Analytical error (mean SD from in-house standards) associated with our sample runs was estimated at 0.2 ‰ for δ

Data treatment TDN as a proxy of water pollution

In order to understand the correlations among the different physicochemical properties of the water and to define a gradient of pollution in the studied rivers, we carried out a principal component analysis (PCA) with the data of dissolved oxygen saturation, pH, temperature and solute concentrations (NO 3 -, SO 4 2-, Cl -, SRP, NH 4 + , TDN and DOC) for each sampling campaign and reach. Due to the distribution of the components in the PC1 axis (Figure S1, Table S1: correlation with PC1), the correlation of the variables with the TDN (Table S1: correlation with TDN), and the importance of nitrogen in determining the functioning of freshwater ecosystems [START_REF] Dodds | Suggested classification of stream trophic state: distributions of temperate stream types by chlorophyll, total nitrogen, and phosphorus[END_REF], we used TDN as the covariate representing the pollution gradient in posterior statistical analyses (log10-transformed and centred into 0 using the average value of the four rivers) (Table 2).

Maximum FCL

Maximum FCL (the linear trophic distance between basal resources and top predators) in each site was estimated following the maximum trophic position convention, assessing top predators' trophic positions (TP) and comparing their δ 15 N values to the mean δ 15 N value of the basal resources at each sampling site [START_REF] Cabana | Comparison of aquatic food chains using nitrogen isotopes[END_REF]: .

Where 3.4 is the trophic discrimination factor (TDF) of δ 15 N (Post, 2002a;[START_REF] Vander Zanden | Variation in δ 15 N and δ 13 C trophic fractionation: Implications for aquatic food web studies[END_REF] and ʎ the trophic level of the baseline indicator, set as 1 because primary producers were used as the baseline. We obtained the maximum FCL from the mean TP values of the individuals with the highest TP in each reach (Table S3).

Contribution of resources to the diet of primary consumers

We used Bayesian Mixing Models to estimate the contribution of the various basal resources to the diets of the primary consumer invertebrates at each river and reach using the MixSIAR package (Bayesian Mixing Models in R; [START_REF] Stock | MixSIAR GUI user manual, version 1.0. Access[END_REF]. Autochthonous resources, fine detritus and alder leaves were treated as separate resources. Due to the very low and sparse distribution among sampling reaches biofilm, filamentous green algae, bryophytes and macrophytes were merged together into the autochthonous resources category. The models consider uncertainty and variation in consumers and TDF to generate a distribution of possible mixing solutions based on the available resources. MixSIAR also provides error terms that contemplate variation due to sampling processing and due to consumers' variability itself (i.e. individual differences in digestibility, assimilation efficiency and metabolic rates) [START_REF] Stock | Unifying error structures in commonly used biotracer mixing models[END_REF]. We used TDF and uncertainties specific for aquatic invertebrates (0.1 ± 2.2‰ for δ 13 C and 2.6 ± 2.0‰ for δ 15 N [START_REF] Brauns | Consumer-resource stoichiometry as a predictor of trophic discrimination (Δ 13 C, Δ 15 N) in aquatic invertebrates[END_REF]). Concentration dependence [START_REF] Phillips | Incorporating concentration dependence in stable isotope mixing models[END_REF] and a multiplicative error structure [START_REF] Stock | Unifying error structures in commonly used biotracer mixing models[END_REF] were also considered in the models. Posterior estimates of the proportional contribution of each resource to each consumer's diet were obtained for each reach. Consumer stable isotope data was previously checked for outliers through simulated mixing polygons [START_REF] Smith | To fit or not to fit: evaluating stable isotope mixing models using simulated mixing polygons[END_REF] with the packages sp [START_REF] Pebesma | Package 'sp[END_REF] and splancs [START_REF] Bivand | Package 'splancs[END_REF]. The method uses a Monte Carlo simulation to iterate Convex hulls ('mixing polygons') based on means and SD of source data and TDF. It applies the point-in-polygon assumption to test if source contributions can explain consumer's isotopic signature in the proposed mixing model. Following the recommendations by [START_REF] Smith | To fit or not to fit: evaluating stable isotope mixing models using simulated mixing polygons[END_REF], no data had to be excluded.

Community iso-space metrics

The trophic structure of the consumer community was estimated for each river and reach using the community-wide metrics described in Layman et al. (2007a) and [START_REF] Jackson | Comparing isotopic niche widths among and within communities: SIBER -Stable Isotope Bayesian Ellipses in R[END_REF]. We considered three functional groups: primary consumers (Baetis, Ecdyonurus, Echinogammarus, Ephemerella and Hydropsyche), predatory invertebrates (Rhyacophila), and fish. Some metrics consider the distribution of the components of each community in the δ 13 C -δ 15 N space to inform about the trophic diversity within each food web. Mean distance to centroid (CD) is one of these metrics, which provides information on the trophic niche through the species distribution in the iso-space. Trophic redundancy was estimated using mean nearest neighbour distance (MNND) and standard deviation of the nearest neighbour distance (SDNND). MNND is the main metric representing trophic redundancy, which provides a measure of density and grouping of the community members. SDNND gives a measure of evenness of spatial density and packing. Smaller MNND represents food webs with taxa having more similar trophic ecologies, whereas smaller SDNND indicates a more uniform spacing of taxa in the food web space [START_REF] Abrantes | Stable isotope-based community metrics as a tool to identify patterns in food web structure in east African estuaries[END_REF]. Thus, smaller values of MNND and SDNND represent greater trophic redundancy, as species have more similar trophic niches. In communities with similar MNND (mean distance) values, smaller SDNND represent higher trophic redundancy. A Bayesian approach to these metrics was performed with the SIAR package in R (Stable Isotope Analysis in R; [START_REF] Jackson | Comparing isotopic niche widths among and within communities: SIBER -Stable Isotope Bayesian Ellipses in R[END_REF][START_REF] Parnell | SIAR: stable isotope analysis in R[END_REF], which allows comparing communities containing different sample sizes. The method also allows propagating sample error on the estimates of the means of community components to provide measures of uncertainty surrounding the metrics, making possible robust statistical comparisons among communities. Standard ellipse areas (SEA) were also calculated with the SIBER package (Stable Isotope Bayesian Ellipses in R; [START_REF] Jackson | Comparing isotopic niche widths among and within communities: SIBER -Stable Isotope Bayesian Ellipses in R[END_REF] to quantify the isotopic niche of each community. This Bayesian standard ellipse is less sensitive to low sample size and extreme values than the total area proposed by Layman et al. (2007b). Therefore, it is a more robust approach for comparisons between communities.

Statistical analyses

All statistical analyses were performed using R software, version 3.6.0. (R Core Team, 2019). We used Linear Models in this study as four values in the covariate (pollution) seem to be not enough for reliable discrimination between linear and non-linear curve fitting [START_REF] Jenkins | A solution to minimum sample size for regressions[END_REF]. For [START_REF] Pinheiro | Mixed-effects models in S and S-PLUS[END_REF]. We also divided samples of each food web in four functional groups: basal resources, primary consumers, predatory invertebrates, and fish. We analysed the stable isotopes of these groups by means of Linear-Mixed Effects Models with Taxa as random factor (except for predatory invertebrates which only contained one taxon and were analysed by means of a Linear Model). FCL was also modelled with Linear Models including TDN, Reach and their interaction as sources of variation. To test for the effect of water diversion, pollution and their interaction on diet contribution analyses and the iso-space metrics, we used Generalised Linear Models (GLMs) on the posterior estimates of the Bayesian models, since including these variables into the Bayesian models caused a lack of convergence. We included 3000 posterior estimates on diet contribution analyses and 4000 posterior estimates in the iso-space metrics analyses for each variable and community. Different numbers of posterior estimates were included in GLMs because settings to avoid convergence problems in Bayesian models differed. Posterior estimates related to diet contribution analyses were adjusted to a binomial distribution (link: logit) and estimates related to community iso-space metrics followed Gaussian distribution (link: identity) [START_REF] Zuur | Mixed effects models and extensions in ecology with R[END_REF]. Different

GLMs were built for each variable using TDN, Reach and their interaction as sources of variation: null model, two models with a single source of variation, a model with both sources of variation and the maximal model, which also included the interaction term. As the sample size was large, Bayesian

Information Criterion (BIC) was used to penalize size and select the best explanatory model in each case [START_REF] Brewer | The relative performance of AIC, AIC C and BIC in the presence of unobserved heterogeneity[END_REF]. Model selection was made with the 'modelsel' function of the MuMIn package [START_REF] Barton | MuMIn: Multi-Model Inference[END_REF]. Due to the large amount of posterior estimates, violin plots were used instead of boxplots to show the distribution of the results whenever Bayesian modelling was applied. For all the linear models we repeated the analysis considering River as a factor instead of TDN as covariate and we tested for pairwise differences between reaches of the same river by means of Post Hoc analysis using the t-statistic (Multcomp package, [START_REF] Hothorn | Simultaneous Inference in General Parametric Models[END_REF].

Results

How did water diversion affect food web complexity?

Water diversion had important effects at the base of the food web that did not propagate to higher trophic levels. This stressor reduced coarse detritus stock by 17.6 % on average from control to diverted river sections (F 1,208 = 17.72, p < 0.001, coefficient Reach Diverted = -0.28; Figure 2a, Table S4), although no within-river differences were observed in the pairwise comparisons (Figure 2a). Fine detritus showed an overall increase downstream from the weirs (F 1,140 = 5.23, p = 0.024, coefficient Reach-Diverted = 0.16; Figure 2b, Table S4), which was driven by the significant difference between reaches of the most polluted river (Figure 2b). Biofilm biomass, however, was unaffected by diversion (F 1,140 = 0.10, p = 0.752, Figure 2c, Table S4). The contribution of different basal resources to the diet of primary consumers showed different patterns. Coarse detritus (alder) contribution showed a slight decrease on diverted reaches (Table 3; Figure 3a; Table S5), which was mainly driven by the pairwise difference between reaches of one of the rivers (Figure 3a). Similarly, the overall contribution of autochthonous resources also decreased on diverted reaches (Table 3; Figure 3c; Table S5). Contrarily, fine detritus N signatures showed no difference between control and diverted reaches, neither for the entire community nor for functional groups (Figure 4a, Figure S2; Table S6) or most of the analysed taxa (Table S7). Consequently, we found similar maximum food chain length (FCL) in diverted and control reaches (F 1,35 = 2.35, p = 0.134, Table S3, Figure 5). In addition, the same fish species were found in both reaches, except for Kadagua that only shared 3 out of the 7 species present in the river (Table S3). Other aspects of trophic structure were weakly affected by water diversion, with a small increase in trophic diversity (CD) and trophic redundancy (lower MNND; although SDNND was higher, and represented more heterogeneous spacing of taxa), and a slight decrease in community niche space (SEA) (Table 4).

Did moderate levels of pollution increase food web complexity?

Pollution modified the base of the food web and lead to important changes in food web structure.

Biofilm biomass increased along the pollution gradient, most clearly at the beginning of the gradient (Table S4, F 1,140 = 28.35, p < 0.001, coefficient log 10 TDN = 1.26 Figure 2c). However, the amounts of coarse and fine detritus showed no significant relationship with the pollution gradient (F 1,208 = 1.54, p = 0.216 and F 1,140 = 0.08, p = 0.771 respectively, Figure 2a andb). There was an overall decrease of the contribution of autochthonous resources to the diet of consumers in control reaches (Table 3; Figure 3c; Table 5S), with no other basal resources changing their overall contribution (Table 3; Figure 3a andb;

Table S5). The δ 15 N signatures increased significantly with pollution for the entire community, each functional group and most of the analysed taxa (Figure 4a, Figure S2; Table S6; Table S7). In addition, the maximum FCL (Figure 5, Table S3) increased significantly with pollution (F 1 , 35 = 138.06, p < 0.001).

Besides differences in the identity of the apex predator among rivers, trophic position of every fish species increased with pollution (Table S3). This stressor also affected every dimension of trophic structure, increasing trophic diversity (CD) and community niche space (SEA) and reducing redundancy (higher MNND; although SDNND was lower, and represented more homogeneous spacing of taxa) (Table 4).

Did food web complexity increase even further when water pollution and diversion interacted?

With the increasing pollution, fine detritus abundance in the diverted reaches surpassed the abundance found in control reaches (interaction: F 1,140 = 16.32, p < 0.001, Figure 2b, Table S4), with the largest, and significant, difference observed in the most polluted river. However, the stock of coarse detritus and biofilm showed no significant interaction between stressors (F 1,208 = 0.17, p = 0.684 and F 1,140 = 0.47, p = 0.493, Figure 2a andc). Only contribution of autochthonous resources showed an interaction between pollution and water diversion, which decreased in the control reaches along the pollution gradient but remained constant in the diverted ones (Table 3; Figure 3c; Table S5). Neither δ 15 N signatures (Figure 4a, Figure S2; Table S6) nor maximum FCL (F 1,35 = 0.15, p = 0.702, Table S3, Figure 5) responded interactively to both stressors. However, δ 13 C values for the entire community and for fish decreased more along the pollution gradient in diverted than in control reaches (Figure 4b; Table S6). Community-wide metrics of consumers were also best modelled by considering the interaction term (Table 4). Trophic diversity (CD, Figure 6a; Table S8) became larger in the diverted reaches of the most polluted rivers (Table 4). These rivers also showed larger community niche space (larger SEA, Figure 6b; Table S8) differences between control and diverted reaches, with the smallest difference between reaches in the least polluted river (Table 4). Trophic redundancy decreased with pollution (higher MNND, Figure 6c; Table S8), with larger reductions (steeper positive slope) for diverted sites (Table 4). Evenness of this metric (SDNND) was lower in the diverted site of the less polluted river, but higher in the diverted sites of the other three rivers (Figure 6d; Table S8).

Discussion

Water diversion and pollution are two pervasive stressors affecting freshwater ecosystems [START_REF] Dudgeon | Freshwater biodiversity: importance, threats, status and conservation challenges[END_REF]. Our study has identified the unique and joint effects of both stressors on different dimensions of the complexity of freshwater food webs. We found that water diversion modified the base of the brown food web by reducing the abundance of detritus. In contrast, nutrients from polluted water stimulated the base of the green food web by promoting biofilm production. How these changes at the base of the food web propagated to higher trophic levels differed between stressors. Water diversion had little effect on the structure of the entire food web but nutrient pollution increased its complexity.

Interactive, although weak, effects were very common among the response variables.

The effects of water diversion at the base of the food web did not propagate to higher trophic levels

The reduction of stocks of detritus in the diverted reaches agrees with previous studies [START_REF] Casas | The effect of a headwater dam on the use of leaf bags by invertebrate communities[END_REF][START_REF] Martínez | Stream regulation by small dams affects benthic macroinvertebrate communities: from structural changes to functional implications[END_REF]. This effect is likely to be a consequence of the retention of detritus in the impoundments above weirs [START_REF] Schmutz | Dams: Ecological Impacts and Management[END_REF], and its deviation through the diversion canals [START_REF] Arroita | Impact of water abstraction on storage and breakdown of coarse organic matter in mountain streams[END_REF]. These impoundments reduce the size of coarse detritus very efficiently and export fine detritus downstream [START_REF] Mbaka | A global review of the downstream effects of small impoundments on stream habitat conditions and macroinvertebrates[END_REF]. Concerning autotrophic basal resources, biofilm can respond non-linearly to river flow and water velocity. Water velocity increases nutrient exchange rates, enabling faster biofilm growth [START_REF] Dewson | A review of the consequences of decreased flow for instream habitat and macroinvertebrates[END_REF], with the highest shear forces limiting biofilm accrual [START_REF] Hondzo | Effects of turbulence on growth and metabolism of periphyton in a laboratory flume[END_REF]. Nevertheless, water diversion did not significantly change biofilm biomass in our study. The few instant velocity measures we had available, although not enough to properly capture flow velocity differences among reaches, did not suggest big velocity changes from control to diverted reaches, in accordance with the lack of changes in biofilm biomass.

Supporting our first hypothesis, the reduction of detritus by water diversion was followed by lower contribution to consumers' diets. However, autochthonous resources remained the main contributors to the diet of primary consumers, even in the diverted reaches, where their contribution was lower than in the control reaches. Considering that water diversion did not change the stock of biofilm, the reduction in autochthonous resource contribution in diverted reaches suggests that the turnover of the biofilm was reduced with the diversion. However, biofilm was not the only autochthonous resource sampled for SIA, and thus, we cannot determine whether turnover or a change in the stock of other autochthonous resources of low abundance was responsible for this decrease. The reduced contributions of coarse detritus and autochthonous resources to the diets in the diverted sites were compensated by an increase in the contribution of fine detritus, which can be linked to the larger abundance of this resource in the diverted sections.

Many studies suggest complex relationships between FCL and ecological drivers, such as ecosystem size, perturbations and resource availability (e. g. Post, 2002b;[START_REF] Takimoto | Effects of productivity, disturbance, and ecosystem size on food-chain length: insights from a metacommunity model of intraguild predation[END_REF][START_REF] Takimoto | Environmental determinants of food-chain length: a meta-analysis[END_REF]. In our study, FCL was not reduced because of habitat contraction nor flow reduction driven by water diversion. Neither was it reduced due to the decrease in the stock and contribution of detritus in the diverted sites, which is poorer in nutrients than the autochthonous basal resources [START_REF] Cross | Ecological stoichiometry in freshwater benthic systems: recent progress and perspectives[END_REF]. The ability to incorporate a basal resource into the biomass of consumers is given by its abundance and its biochemical composition [START_REF] Brett | How important are terrestrial organic carbon inputs for secondary production in freshwater ecosystems?[END_REF]. Algae can support upper trophic levels across many aquatic systems due to the high nutritional quality of their amino and fatty acids [START_REF] Brett | How important are terrestrial organic carbon inputs for secondary production in freshwater ecosystems?[END_REF] and can be more relevant than the detrital input in determining food web structure [START_REF] Townsend | Disturbance, resource supply, and food-web architecture in streams[END_REF]. Thus, longer food chains can be held in more productive ecosystems (Post, 2002b). We did not observe any change in the stock of biofilm due to the diversion; however, the lower contribution of autochthonous resources to the diets of consumers in the diverted reaches compared to control reaches (mainly in the less polluted streams) should also have been accompanied by a reduction of the maximum FCL, which did not happen. Fine detritus, richer in nutrients than coarse detritus [START_REF] Cross | Ecological stoichiometry in freshwater benthic systems: recent progress and perspectives[END_REF], contributed more in the diets of consumers in the diverted sites. The shift from one nutrient-rich resource to another could have maintained the consumer-resource stoichiometric imbalance, and thus, FCL. [START_REF] Kautza | Anthropogenic and natural determinants of fish food-chain length in a midsize river system[END_REF] assigned changes in FCL of a regulated river to a combination of mechanisms such as addition and deletion of top predators and insertion of intermediate predators, shifts in the degree of omnivory, and changes in the strength of intraguild predation. Nevertheless, we found the same set of top predators when comparing control and diverted reaches in three out of four rivers, explaining the lack of effects of the diversion on FCL. Similar results to ours were reported by [START_REF] Walters | An experimental disturbance alters fish size structure but not food chain length in streams[END_REF], who did not observe a decrease in FCL as a consequence of water diversion. However, they described a shift in body-size structure, suggesting that the structural complexity of the food web allowed the conservation of the FCL.

We expected diversification of the trophic niches due to the reduction of relative abundance the lowquality coarse detritus in comparison to the abundance of biofilm and fine detritus driven by water diversion. In line with this, [START_REF] Kaymak | Spatial and temporal variation in food web structure of an impounded river in Anatolia[END_REF] reported higher trophic diversity and a larger community niche space in the regulated reach downstream from a large dam. They linked it to a higher dominance of trophic generalists, who can shift among alternative resources (Layman et al., 2007b).

However, the shift they found was related to decreased fish diversity in the downstream reach, which has not been corroborated in our study. The changes we observed in the iso-space metrics occurred regardless of the lack of large taxonomic changes, at least for top predators. In addition, our models indicate a larger trophic diversity and a smaller community niche space in the diverted reaches for all our systems when looking at the selected consumer taxa. Thus, water diversion produced a collapse of generalist species in the iso-space (i.e., the core of the iso-space). In contrast, more specialised consumers and/or species at the top and bottom of the food webs expanded the overall isotopic space of the community. A plausible explanation for this contrasting pattern can be found in the competition exerted by the more specialised consumers at the edges of the iso-space that might have reduced resource availability for the consumers at the core of the food web.

Pollution promoted biofilm production and increased food web complexity

A non-linear effect of nutrient pollution on biofilm production is frequently described in the literature, with stimulating effects of moderate levels of nutrients (e.g. [START_REF] Ardón | Experimental nitrogen and phosphorus enrichment stimulates multiple trophic levels of algal and detrital-based food webs: a global meta-analysis from streams and rivers[END_REF][START_REF] Pereda | Impact of wastewater effluent pollution on stream functioning: A whole-ecosystem manipulation experiment[END_REF][START_REF] Ribot | Biofilm growth and nitrogen uptake responses to increases in nitrate and ammonium availability[END_REF], where subsidy effects of nutrients override toxic effects of other compounds.

Similarly, along our pollution gradient, biofilm biomass increased. In addition, previous studies that assessed the effects of land use (and thus, of nutrient concentrations; [START_REF] Baumgartner | Changes in macroinvertebrate trophic structure along a landuse gradient within a lowland stream network[END_REF][START_REF] Pastor | Temporal Variability of Nitrogen Stable Isotopes in Primary Uptake Compartments in Four Streams Differing in Human Impacts[END_REF][START_REF] Price | Land use alters trophic redundancy and resource flow through stream food webs[END_REF] stated that all community compartments increased in δ 15 N along the pollution gradient; a result that was completely paralleled in our study. Both total nitrogen and δ 15 N concentration can be associated with agriculture runoff [START_REF] Bergfur | Effects of nutrient enrichment on C and N stable isotope ratios of invertebrates, fish and their food resources in boreal streams[END_REF][START_REF] Harrington | 15N enrichment in agricultural catchments: field patterns and applications to tracking Atlantic salmon (Salmo salar)[END_REF][START_REF] Pastor | Temporal Variability of Nitrogen Stable Isotopes in Primary Uptake Compartments in Four Streams Differing in Human Impacts[END_REF] and urbanisation [START_REF] Pastor | Temporal Variability of Nitrogen Stable Isotopes in Primary Uptake Compartments in Four Streams Differing in Human Impacts[END_REF][START_REF] Smucker | Stable isotopes of algae and macroinvertebrates in streams respond to watershed urbanization, inform management goals, and indicate food web relationships[END_REF], and thus, are often correlated. Additionally, our study highlights that the δ 15 N increase along the TDN gradient was stronger for consumers than for basal resources, which points towards a reorganization of food webs, and not only to a propagation of the isotopic signal of basal resources. This reorganization was also represented by the longer FCL with the increase in nitrogen, which is in line with previous observations [START_REF] Kaunzinger | Productivity controls food-chain properties in microbial communities[END_REF] and in accordance to the productivity hypothesis [START_REF] Pimm | Food webs, in: Food Webs[END_REF]. Although other variables, such as water temperature and conductivity, covaried with the pollution gradient, the good fit between δ 15 N or FCL with water TDN points to pollution, and specially nutrient concentration, as the main driver shaping food webs in this study.

With more nutrients in the water column and higher biofilm biomass, a scarce but high-quality resource, we anticipated a reorganization of the niche space of the consumers, with more separate and diverse niches. Moderate nutrient pollution, and consequent biofilm availability, have been linked to a larger isotopic variability [START_REF] García | Effects of landuse intensification on stream basal resources and invertebrate communities[END_REF][START_REF] Parreira De Castro | Land Use Influences Niche Size and the Assimilation of Resources by Benthic Macroinvertebrates in Tropical Headwater Streams[END_REF] as isotopic diversity of basal resources increases. However, further pollution of water by nutrients can also cause a drastic reduction of the diversity of resources (reducing isotopic variability among the available resources), leading to narrower isotopic variation among consumers [START_REF] García | Effects of landuse intensification on stream basal resources and invertebrate communities[END_REF]. In our study, we observed an overall increase in trophic diversity and a decrease in redundancy along the pollution gradient (i.e. a diversification on consumers' diet and a more uniform spacing of taxa), suggesting that our systems did not suffer from the effects of severe nutrient pollution. However, we must bear in mind that the works cited above are based on isotopic analyses of the entire community, whereas we have centred our study on the core communities of the studied systems, i.e. the same six invertebrate taxa that appeared in all sampling sites plus fishes. Thus, despite responses in our study cannot be attributed to interspecific, but to intraspecific variation, the isotopic patterns are similar.

Effects of water diversion and pollution on food web complexity were exacerbated in combination

When dealing with multiple stressors in the same study it is of interest to rank the stressors in order of ecological relevance and to describe the kind of interaction that they create in response variables. Few studies have already addressed the combined effects of flow reduction and nutrient enrichment (e.g. [START_REF] Elbrecht | Multiple-stressor effects on stream invertebrates: a mesocosm experiment manipulating nutrients, fine sediment and flow velocity[END_REF][START_REF] Lange | Responses of stream fish populations to farming intensity and water abstraction in an agricultural catchment[END_REF][START_REF] Matthaei | Multiple stressors in agricultural streams: interactions among sediment addition, nutrient enrichment and water abstraction[END_REF]. In mesocosms studies, [START_REF] Elbrecht | Multiple-stressor effects on stream invertebrates: a mesocosm experiment manipulating nutrients, fine sediment and flow velocity[END_REF] and [START_REF] Matthaei | Multiple stressors in agricultural streams: interactions among sediment addition, nutrient enrichment and water abstraction[END_REF], observed pervasive and stronger effects of flow reduction than those associated with nutrient enrichment on the studied variables regarding benthic macroinvertebrates and algal biomass. In contrast, in a field study, [START_REF] Lange | Responses of stream fish populations to farming intensity and water abstraction in an agricultural catchment[END_REF] showed that nutrient pollution had a larger effect than water diversion on fish populations. The severity of both stressors can vary hugely, as droughts can be created by diversion, and some local extinctions can be the outcome of nutrient pollution. In our case, food webs were more sensitive to pollution than to water diversion. Moreover, pollution was modulating the response of some food web properties to diversion. For instance, when focusing on the iso-space metrics of the selected consumer taxa of the studied rivers, interaction was the norm: trophic diversity was higher and redundancy lower in the diverted sites of the most polluted rivers. Thus, the increase of the availability of biofilm along the pollution gradient led detritus-deprived consumers of the diverted reaches to expand further their diet towards autotrophic resources.

Conclusions

Ecosystems face multiple stressors. It is crucial to study multiple stressors simultaneously to understand interactive effects, create predictive tools and rank their relevance based on their relative ecological impact. In this study based on a representative subset, both pollution and water diversion affected food webs by means of bottom-up mechanisms and nutrient pollution intensified the effects of diversion on the community food web structure. We expect these results to be widespread and strong across freshwater ecosystems that depend mostly on low quality detrital resources, whereas we anticipate these effects to be weaker in systems that mostly depend on high-quality resources, such as biofilm. In addition, both pollution and water diversion can vary in their intensity, resulting in different outcomes on food webs. More severe degrees of pollution and larger water removals are expected to trigger local extinctions and hence food web simplification. It is uncertain to what extent non-linear responses to both stressors will emerge as their intensity increase [START_REF] Hillebrand | Thresholds for ecological responses to global change do not emerge from empirical data[END_REF]. We believe our results will foster further research on the interactive effects of multiple stressors of varying intensities to better understand their effects on freshwater ecosystems globally. Black regression lines (solid line for control; dashed line for diverted) are drawn with the significant coefficients from linear (biofilm) and linear mixed effect models (coarse and fine detritus). A single grey line is shown when only the TDN was significant in the model, and black regression lines (solid line for control; dashed line for diverted) are drawn when the effect of the diversion differed. Bands around the line represent the 95% confidence interval. Significant differences between the control and diverted reaches within each river are marked with an asterisk. and (d) standard deviation of nearest neighbour distance (SDNND). These metrics provide information about trophic diversity, community niche space and redundancy of the eight consumer communities (white for control; grey for diverted) along the total dissolved nitrogen (TDN) gradient, respectively.

Black regression lines (solid line for control; dashed line for diverted) are drawn according to the preferred model. Significant differences between the control and diverted reaches within each river are marked with an asterisk.

Fish

  sampling was conducted along the 100-m long reaches by depletion electrofishing with a backpackelectrofishing unit (Hans Grassl model IG2002/D30). Stop-nets were set upstream and downstream of the reaches. All cached fish were anaesthetised with MS-222, identified and up to five individuals per species in each reach were euthanized (reference number of the ethics commission: M20/2016/135).Samples of dorsal muscle were extracted in the field. All the samples were immediately frozen (-20°C) for processing and SIA.Frozen samples were freeze-dried (VirTis Benchtop 2K) (from 12 to 72h depending on their water content), grounded (Resources in a ball-mill (Vibration mill MM301, Fisher Bioblock Scientific); Animal samples in a homogeniser (Precellys® 24, Bertin instruments)) and weighed (approximately 1 mg for invertebrates and fish, 10 mg for fine detritus and 2 mg for other basal resources) into tin capsules (Lüdiwiss Sn 98, 5 x 8 mm) for SIA. The Stable Isotope Facility of the University of California -Davis performed Carbon (C) and Nitrogen (N) stable isotope analyses on a PDZ Europa 20-20 isotope ratio mass spectrometer (Sercon Ltd., Cheshire, UK). Results are expressed as the relative difference between ratios of samples and international standards (Pee-Dee Belemnite limestone formation for δ 13

  details regarding the collected data, see[START_REF] De Guzman | Dataset: Water diversion and pollution interactively shape freshwater food webs through bottom-up mechanisms[END_REF].

  resource and taxon, biofilm stock and fine detritus Linear Models were built by including TDN (covariate), Reach (factor) and their interaction as sources of variation. The same sources of variation were used for coarse detritus stock in Linear-Mixed Effects Models (function lme, in R package nlme[START_REF] Pinheiro | ) nlme: Linear and Nonlinear Mixed Effects Models[END_REF]) with Sampling campaign as random factor. Variance components of Mixed Effects Models were estimated by means of restricted maximum likelihood and p values estimated by means of likelihood ratio tests

Figure 1 .

 1 Figure 1. Conceptual figure of the proposed hypotheses: H1 refers to the hypothesis regarding water diversion, H2 refers to the one related to the increase in pollution and H3 refers to the interaction between the two stressors. Control reach and diverted reach refer to the sampling sites above and below the weirs. Low pollution and moderate pollution is a simplification of the pollution gradient. CPOM and FPOM are coarse and fine detritus. FCL refer to food chain length. Basal food resources, coarse detritus, fine detritus and biofilm, are represented in dark brown, light brown and light green respectively in the figure, and consumers are represented in dark red. The food web arrangement of the C-N biplot from Control-Low pollution site is redrawn in ligther colours in the other biplots as reference. δ15N indicates the trophic position of each element of the biplot, whereas δ13C informs about the relative proximity to the basal resources. (+) and (-) symbols indicate an increase or a decrease respectively.

Figure 2 .

 2 Figure 2. Resource abundance in the studied reaches (white for control; grey for diverted): (a) coarse detritus (CPOM), (b) fine detritus (FPOM) and (c) biofilm represented along the total dissolved nitrogen (TDN) gradient. The box plots show the median, the interquartile range and the tails of the distribution.

Figure 3 .

 3 Figure 3. Bayesian posterior estimates showing the contribution of (a) Alder, (b) fine detritus (FPOM) and (c) autochthonous resources (biofilm, filamentous green algae, bryophytes and macrophytes) to the diets of consumers (white for control; grey for diverted) along the total dissolved nitrogen (TDN) gradient. Black regression lines (solid line for control; dashed line for diverted) are drawn according to

Figure 4 .

 4 Figure 4. (a) Nitrogen stable isotope ratios (δ 15 N, ‰) and (b) Carbon stable isotope ratios (δ 13 C, ‰) of the entire community in the studied reaches (white for control; grey for diverted) represented along the total dissolved nitrogen (TDN) gradient. The box plots show the median, the interquartile range, and the tails of the distribution. A single grey regression line is represented when only the TDN gradient was significant and black regression lines (solid line for control; dashed line for diverted) are drawn when the effect of the diversion differed. Bands around the line represent the 95 % confidence interval.

Figure 5 .

 5 Figure 5. Maximum food chain length (FCL) in the studied reaches (white for control; grey for diverted) represented along the total dissolved nitrogen (TDN) gradient. The box plots show the median, the interquartile range and the tails of the distribution. A single grey regression line was represented as only the TDN gradient was significant. Bands around the line represent the 95 % confidence interval.

Figure 6 .

 6 Figure 6. Bayesian posterior estimates of community wide metrics of the iso-space for consumers: (a) distance to centroid (CD), (b) standard ellipses area (SEA), (c) mean nearest neighbour distance (MNND)

  , TableS1). On each occasion,

	reach discharge (m	3 s -1 ) was measured with an acoustic doppler velocity meter (ADV; Flow Tracker 2,
	SonTekHandheld-AD®, USA) through a cross-section. Wet channel mean width was obtained from
	equidistant transects every 10 m. Water was characterised by measuring temperature (°C), pH, electrical
	conductivity (µS cm -1 ) and dissolved oxygen saturation (%, DO) using hand-held probes (WTW Multi 350i
	and WTW 340i SET, WTW Wissenschaftlich, Weilheim, Germany; YSI ProODO handled; YSI Incorporated,
	Yellow Springs, OH, USA). Information on chemical composition of water samples were also gathered for
	each sampling occasion through analysis of filtered (0.7-µm pore size pre-combusted glass-fiber filters,
	Whatman GF/F, Whatman International Ldt., Kent, UK) and frozen (-20°C) water samples. The
	concentrations of nitrate (NO 3 -, mg L	-1 ), sulfate (SO 4	2-, mg L	-1 ) and chloride (Cl	-, mg L	-1 ) in water samples
	were determined with capillary ion electrophoresis (Agilent G1600AX 3D, Agilent Technologies,
	Wilmington, DE, USA) (Environmental Protection Agency, 2007). Spectrophotometric (Shimadzu UV-
	1800 UVeVis, Shimadzu Corporation, Kyoto, Japan) methods were used to measure the concentration of
	soluble reactive phosphorus (SRP, µg P L	-1

Table 1 .

 1 Main characteristics of the studied rivers. The total annual precipitation and mean annual air temperature are the average values for 2017 and 2018 (www.euskalmet.euskadi.eus).

	Tables
								Ecological status
	and the Referenced Physicochemistry Index (RPI) for the period 2012-2016 are shown (Aguirre et al.,
	2017); the asterisk (*) indicates rivers with a heavily altered hydromorphology. Rivers are ordered
	following log 10 (TDN) values from left to right.
				Urumea	Leitzaran	Kadagua	Deba
	Basin			Urumea	Oria	Kadagua	Deba
	Coordinates of	Latitude		43°12'53.5"N 43°07'57.6"N 43°13'37.9"N 43°09'37.6"N
	the dam	Longitude		1°54'16.7"W 1°56'13.4"W 3°00'58.8"W 2°24'08.6"W
	Elevation (m asl)		69	354	37		122
	Total annual precipitation (mm)	1838.6	2268.4	1288	1316.2
	Mean annual air temp. (°C)		13.5	13.6	13.3		12.7
	Upstream catchment area (km	2 )	186.1	62.8	449		355.1
	Land use (%) in upstream catchment area	Urban Agriculture Forestry Water		0.1 0.8 98.3 0.8	1.1 10.7 88.2 0.0	2.5 25.8 71.5 0.3		4.6 17.4 77.8 0.2
	Ecological status		Good	Good	Good	*	Moderate	*
	RPI			0.80 ± 0.01	0.79 ± 0.01	0.78 ± 0.01	0.68 ± 0.02
	Maximum concession volume (m 3 s -1 )	5.8	3.0	4.0		5.0

Table 2 .

 2 Compiled mean and standard error of physicochemical descriptors in each reach of the studied rivers. TDN gradient score for each river is also indicated in the table. Rivers are ordered following log 10 (TDN) values from left to right.

										Urumea	Leitzaran	Kadagua	Deba
										Control	Diverted	Control	Diverted	Control	Diverted	Control	Diverted
	pH									7.65 ± 0.09	7.54 ± 0.08	8.13 ± 0.05	8.14 ± 0.02	8,16 ± 0.13	8.27 ± 0.10	8.14 ± 0.19	8.15 ± 0.04
	Conductivity (µS cm	-1 ) 75.13 ± 5.89 74.97 ± 6.32 243.00 ± 19.14 242.33 ± 19.64 586.00 ± 38.32 590.00 ± 45.51 505.00 ± 78.23 508.67 ± 61.48
	Temperature (°C)	14.80 ± 1.21 15.00 ± 1.10	15.13 ± 2.14	15.73 ± 2.21	16.70 ±2.39	17.00 ± 2.30	18.30 ± 0.38	17.90 ± 0.38
	Dissolved oxygen (%) 108.90 ± 5.77 108.60 ± 6.82 103.30 ± 6.58 102.3 ± 0.88	97.00 ± 0.05	103.9 ± 1.93	115.40 ± 0.91 105.80 ± 4.68
	Cl -(mg L	-1 )								4.16 ± 1.50	3.00 ± 0.38	6.06 ± 0.28	6.98 ± 2.73	14.28 ± 5.37	8.03 ± 1.06	12.22 ± 1.97	12.37 ± 1.70
	SO 4 -2 (mg L	-1 )		2.55 ± 0.91	2.1 ± 0.46	7.07 ± 0.95	7.18 ± 3.17	35.83 ± 10.93	20.32 ± 1.06	19.85 ± 5.99	20.02 ± 5.70
	NO 3 -(mg L	-1 )		1.58 ± 0.67	1.04 ± 0.22	2.53 ± 0.11	2.81 ± 0.94	3.56 ± 2.70	0.98 ± 0.17	2.13 ± 0.38	2.22 ± 0.17
	NH 4 + (µg N L	-1 )	15.65 ± 2.69 16.68 ± 5.61	14.32 ± 4.70	13.90 ± 5.38	56.72 ± 8.61	51.53 ± 9.82	27.02 ± 7.07	24.50 ± 6.75
	DOC (mg C L	-1 )	1.91 ± 0.14	1.91 ± 0.48	3.39 ± 0.15	3.97 ± 0.39	6.40 ± 0.52	7.89 ± 0.83	5.67 ± 0.96	6.14 ± 0.26
	TDN (mg N L	-1 )	0.85 ± 0.06	0.85 ± 0.04	1.11 ± 0.10	1.26 ± 0.17	1.54 ± 0.10	1.47 ± 0.11	1.94 ± 0.28	1.94 ± 0.35
	SRP (µg P L	-1 )		6.78 ± 1.12	9.92 ± 1.73	32.18 ± 11.42	29.04 ± 9.58	31.59 ± 11.10	28.10 ± 9.90	54.11 ± 9.90	49.25 ± 16.45
	Wet width (m)	21.57 ± 0.57 15.98 ± 0.75	10.12 ± 0.42	9.66 ± 0.40	20.88 ± 0.79	16.89 ± 0.74	20.61 ± 0.79	16.58 ± 0.44
	Discharge (m	3 s -1 )	4.60 ± 1.43	1.71 ± 0.23	1.67 ± 0.62	0.9 ± 0.68	2.57 ± 1.22	0.80 ± 0.10	1.55 ± 0.63	0.94 ± 0.13
	TDN gradient (Log 10 TDN)	-0.064 ± 0.017	0.073 ± 0.035	0.177 ± 0.021	0.288 ± 0.043

Acknowledgements

This research was supported by the Spanish Department of Economy, Industry and Competitiveness through the project GL2016-77487-R (DIVERSION), the European Social Fund, the Basque Government (Consolidated Research Group IT951-16) and the Biscay Province Council (61/2015). Authors also acknowledge the financial support from pre-doctoral fellowship from the Basque Government (I. de Guzman), pre-doctoral fellowship from the Spanish ministry (A.V. Perez-Calpe) and pre-doctoral fellowship from CONICET (P. Altieri). D. von Schiller is a Serra Húnter Fellow. J. M. Montoya is funded by the FRAGCLIM Consolidator Grant (number 726176) from the European Research Council under the European Union's Horizon 2020 Research and Innovation Program and by the "Laboratoires d'Excellences (LABEX)" TULIP (ANR-10-LABX-41). Authors are especially grateful to Janire Diez for her assistance in laboratory analyses, to EKOLUR (Asesoría ambiental-Ingurumen aholkularitza), SGIker technical and human support (UPV/EHU, MICINN, GV/EJ, ESF) and UC Davis Stable Isotope Facility.

Comments from the anonymous reviewers significantly improved the manuscript.

Data availability statement

The original data that support the findings of this study are openly available in Figshare and GitHub (https://doi.org/10.6084/m9.figshare.17014022.v1).

Conflict of interest

Authors declare that there is no conflict of interest regarding the material discussed in the manuscript.

Table 3. Model-selection for the drivers (pollution -Log 10 TDN-, water diversion -Reach-, both -Log 10 TDN 835 + Reach-and their interaction -Log 10 TDN *Reach-) affecting basal resource (alder, fine detritus and 836 autochthonous resources) contribution to primary consumers. Degrees of freedom (df), log-likelihood 837 ratios (logLik), Bayesian Information Criterion (BIC), and the difference with the model with lowest value 838