A development company was lobbying to build the properties on land next to a Site of Special Scientific Interest called Askham Bog near York, North Yorkshire.
But the City of York Council's planning committee yesterday (Thursday) rejected the proposal over concerns about the impact it would have on the bog.
The decision came after Sir David, speaking earlier this year, said he was "so disappointed" to hear about the plans from developer Barwood Land.
-> Yorkshire Wildlife Trust volunteers go back to natureAskham Bog is a regarded as one of the most ecologically diverse sites in Northern England, with a wide variety of plants, invertebrates and more than 90 species of bird.
It is run by the Yorkshire Wildlife Trust, which had been frantically campaigning against the plans since they re-emerged in January, after initially being rejected in 2016.
Louise Wilkinson, campaigns manager at the trust, said: "It's fantastic news, we're absolutely delighted.
"Yorkshire Wildlife Trust has fought this application for years and more than 7,000 people from York and around have stood with us.
"We couldn't be happier with this outcome both for the wildlife at the bog and for the people who have supported us.
"It means a lot to all of us - we really care about the bog."
The City of York Council's planning committee took just over an hour to turn down the proposals.
As well as concerns over the impact on the bog officials also cited worries over the future of transport, health services and schools in the area had the building gone ahead.
Gary Halman, speaking on behalf of developer Barwood Land at the meeting, said York has a "housing crisis" with a need for more affordable housing.
He added: "I recognise the concerns about the bog. We clearly have a difference of opinion on the impact on the bog.
"Our technical studies have been peer reviewed and are robust. We dispute that there's any risk to the bog. There's no prospect of the bog drying out."
He claimed there may be benefits to biodiversity and protecting the run off of nitrates into the bog.
But Prof Alastair Fitter, professor of ecology at the University of York, said the site is "exceptional" and added: "It's one of the gems of the UK wildlife scene. It's survived for 15,000 years - I would urge you not to take any risks with it."
A report by planning officers said the housing scheme would be an inappropriate development in the Green Belt, have an adverse impact on the bog, put extra demand on school places and lead to more traffic in the area.
Coun Paul Doughty said he had "never seen as many concerns in one planning application as this".
Coun Andy D'Agorne said: "It could be akin to saying we have to demolish the Minster to build housing. It's that important to our biodiversity heritage.
"It's 15,000 years in the making - to lose it would be catastrophic for biodiversity."
Coun Nigel Ayre added: "There's so many reasons for this to be refused."
The application was unanimously refused.