Riparian forests are expected to play a crucial role in the global carbon (C) cycle but the complex mechanisms of C sequestration in forests remain poorly understood. This study used a comprehensive approach to analyze C sequestration that included the main C compartments in forests, i.e., litterfall, fine roots, and aboveground woody biomass. We aimed at modeling each of them in response to an array of environmental drivers to untangle the functioning of C sequestration by compartment. The study was conducted in a Central European riparian forest that is part of the Donau-Auen National Park in Austria. Carbon sequestration by compartment was correlated with environmental parameters (climate, stream flow, hydrological, spatial, and forest stand parameters) using generalized linear mixed models (GLMM), and the correlations were prioritized by hierarchical partitioning. Our results suggest divergent responses of C sequestration in different ecosystem compartments under dry and wet soil conditions. In particular, dry conditions led to significantly higher C sequestration in aboveground woody biomass (larger distance to the low groundwater table), whereas wetter conditions fostered C sequestration in fine-root (smaller magnitude of fluctuation in the groundwater table) and leaf biomass (smaller distance to the low groundwater table). Fine roots and litterfall responded to short-term variations in climate (mean annual temperature) and flooding parameters (duration of the low to mean Danube River water level in the previous dormant season), highlighting the pivotal role of the dynamic fine-root and leaf biomass compartments for C uptake in forest ecosystems. Consequently, litterfall and fine roots should be considered to improve the sensitivity of C sequestration model responses to climate scenarios.DFG, CI 175/1, Steuergrößen der Kohlenstoffdynamik im Boden und in der Vegetation von Auwälder