Policies often entail costs today but benefits only far into the future, as in climate change mitigation. An essential aspect of how this trade-off is faced relates to how young are the politicians in power. We study closely contested elections in Brazil and show that young politicians reduce deforestation and greenhouse gas emissions with no significant effects on local income. We further show that young politicians invest in long-term policy and hire more young bureaucrats. Our results suggest a cohort effect: young politicians matter not because of their age, but because they are part of a new generation.