Historically, states have found it useful to regulate their relationship over their shared water resources via treaties. While treaties provide some element of predictability and certainty with regard to the future supplies of water to the riparian states, they also need to incorporate mechanisms that allow flexibility to respond to changes in the quantity of water available for allocation amongst the parties. This requirement is especially relevant when global climate change is causing freshwater resources to shrink. The legal regime of the Guadiana, as an example of a modern legal regime of a transboundary river, includes some provisions that permit the riparian states to accommodate the variability of the Guadiana's streamflow in response to climate change within the water allocation arrangements. The lessons learned from these provisions, which include periodical update of the historical mean precipitation values, updating the flow regime of the rivers and cancelling minimum flow requirements under special circumstances, may contribute to climate-proofing international transboundary agreements within the catchments where climate-change induced water scarcity poses a major threat.