Algae, as primary producers in riverine ecosystems, are found in two distinct habitats: benthic and pelagic algae typically prevalent in shallow/small and deep/large streams, respectively. Over an entire river continuum, spatiotemporal patterns of the two algal communities reflect specificity in habitat preference determined by geomorphic structure, hydroclimatic controls, and spatiotemporal heterogeneity in nutrient loads from point- and diffuse-sources. By representing these complex interactions between geomorphic, hydrologic, geochemical, and ecological processes, we present here a new river-network-scale dynamic model (C(n)ANDY) for pelagic (A) and benthic (B) algae competing for energy and one limiting nutrient (phosphorus, P). We used the urbanized Weser River Basin in Germany (7th-order; similar to 8.4 million population; similar to 46 K km(2)) as a case study and analyzed simulations for equilibrium mass and concentrations under steady median river discharge. We also examined P, A, and B spatial patterns in four sub-basins. We found an emerging pattern characterized by scaling of P and A concentrations over stream-order whereas B concentration was described by three distinct phases. Furthermore, an abrupt algal regime shift occurred in intermediate streams from B dominance in omega <= 3 to exclusive A presence in omega >= 6. Modeled and long-term basin-scale monitored dissolved P concentrations matched well for omega<4, and with overlapping ranges in omega<3. Power-spectral analyses for the equilibrium P, A, and B mass distributions along hydrological flow paths showed stronger clustering compared to geomorphological attributes, and longer spatial autocorrelation distance for A compared to B. We discuss the implications of our findings for advancing hydro-ecological concepts, guiding monitoring, informing management of water quality, restoring aquatic habitat, and extending CANDY model to other river basins. (C) 2021 The Authors. Published by Elsevier Ltd. (C) 2021 The Authors. Published by Elsevier Ltd.