A machine learning tool has identified optimal locations for afforestation across Europe, boosting flood reduction and water conservation. The EU-wide strategy could cut river flood peaks by up to 43% while preserving groundwater.