Portobello High in Edinburgh has become the first secondary in Scotland to be awarded permanent green flag status for its environmental work.
More than 20 primaries, nurseries and special schools have permanent accreditation but, until now, no high schools had achieved the top award.
Kirsten Leask, senior officer with Eco-Schools Scotland, who was involved in assessing the school, said: "This proves it can be done in secondary and is a groundbreaking achievement. Pupils at the school are clued up about environmental issues. There's a real spread of achievement that brings the whole school together - no mean feat, given Portobello is a large school."
The school has an allotment where it grows vegetables which are used in home economics. The department then composts any waste, helping to guarantee bountiful future crops. Pupils have also started to build a bio- diversity garden.
"A lot of Portobello High's feeders are accredited green flag schools, which is great because it means they are living sustainably from a young age and that is kept going into high school. It even uses Eco-Schools to ease transitions, given it's a common theme."
Peigi Macarthur, the headteacher, said: "It's the rich learning that the pupils experience through involvement in initiatives such as Eco-Schools that makes a real difference."