Stockholm will be European Green Capital in 2010, followed by Hamburg in 2011.
"I congratulate Stockholm and Hamburg for their efforts to give priority to the environment and quality of life," said Environment Commissioner Stavros Dimas in a statement.
"Four out of five Europeans now live in urban areas, and that is where the environmental challenges facing our society are most apparent. With their measures to tackle air pollution, traffic and congestion levels, greenhouse gas emissions, and waste and waste water management, Stockholm and Hamburg can act as role models for the rest of Europe," he added.
The commission praised Stockholm's goal of becoming entirely fossil free by 2050. It also pointed out that 95 percent of the city's inhabitants live within 300 metres of green areas "that improve the local quality of life, bringing recreation, water purification, noise reduction, and an enhancement of biodiversity and ecology."
Stockholm was also commended for beach improvements, high recycling rates, its congestion charging system, an extensive public transport system and carbon emissions that were half the national average.
In all, 35 cities across the European Union, EU candidate countries and the European Economic Area applied for the prestigious environmental award. Stockholm and Hamburg beat off the challenge of six other shortlisted cities: Amsterdam, Bristol, Copenhagen, Freiburg im Breisgau, Münster, and Oslo.