A controversial £50m plan to build a hotel, student flats and homes in Edinburgh has been rejected by the Scottish government.
Drum Property Group had appealed the decision by City of Edinburgh Council to refuse permission for the demolition of Stead's Place on Leith Walk.
Campaigners said the developer had been "completely out of step with community needs".
The Drum Group said it would consider its position next year.
Reporter Karen Black from the planning and environmental appeals division of the Scottish government said she agreed with heritage and community groups that the red sandstone building reinforced the character of Leith Walk.
She added the building made a "positive contribution" to the character and appearance of the area.
She said: "I concluded planning permission should be refused as the replacement buildings would not preserve or enhance the character and appearance of the conservation area, in contravention of the relevant statutory tests and development plan policies.
"It follows that there is currently no acceptable redevelopment proposal that might justify demolition."
It follows seven months of assessment by the reporter.
In February councillors rejected the plans despite council officials recommending them for approval.
A major supporter of the new development, the University of Edinburgh, then pulled out before the developer lodged an appeal to the Scottish government.
The plans include 471 student flats for postgraduates, a 56-bedroom hotel and 53 affordable homes.
A spokesperson for Drum Property Group said: "We are obviously disappointed by the decision by the Scottish government reporter.
"We shall now review the reporter's detailed findings before considering our position in the New Year."
Campaigners said the decision had come too late for a host of Leith Walk businesses who have been forced to shut along a side of the three acre site.
A Save Leith Walk spokesman said: "Today's decision shows what can be done when a community organises and unites behind a common message.
"It shows the developers plans for Steads Place were completely out of step with community needs for housing, local businesses and retaining our heritage."
Ben Macpherson MSP for Edinburgh Northern and Leith said: "I'm absolutely delighted for the community that the Scottish government's reporter has decided to uphold the decision.
"Today Leith has been heard.
"I'm very proud that together we've achieved this positive result for the community and preserving Leith's heritage."
However he added: "It's very disappointing that Drum evicted several good businesses over the last year."
Neil Gardiner, City of Edinburgh Council's planning convener, said: "I'm delighted that our decision has been upheld and that the reporter saw no good reason for this much loved 1930s building to be demolished."