Groundwater can have a critical role in sustaining the functioning of natural ecosystems during droughts, especially in dry and seasonally dry climates. However, the response to droughts of ecosystems embedded in urban areas is not well known. This study investigates how different scenarios of groundwater availability control the water balance and vegetation productivity of two urban reserves hosting native vegetation in the Melbourne metropolitan area, Australia. Using a mechanistic ecohydrological model supported by field observations, long-term simulations were run to explore the impact of groundwater flow on water, carbon, and energy fluxes under present climatic conditions, including the Millennium Drought (2001)(2002)(2003)(2004)(2005)(2006)(2007)(2008)(2009), and in response to perturbations in key environmental variables (air temperature, atmospheric CO 2 concentrations, and rainfall). It was found that the presence of a water table and its capillary fringe within the root depths supports ecosystem transpiration and vegetation productivity. The effects of declining groundwater were found to be more severe in predominantly sandy soils because of the lower water holding capacity, identifying that the water status of vegetation differs significantly depending on soil type. Differences in rooting strategies and groundwater availability also had a pivotal role in helping plants soften the impacts of increased air temperature (T a ) and make use of higher atmospheric CO 2 concentrations. Increased T a strongly affected evapotranspiration, enhancing the competition for water between different vegetation types. These results provide quantitative insights of how vegetation responds to groundwater depletion and climate variability, highlighting the essential role of groundwater resources in urban ecosystems characterized by seasonally dry climates.