Marston's had agreed to sell the historic Carlton Tavern to care-home provider Crown Care for transformation into a modern 74-bedroom care home.
The planning application was rejected by a margin of just one vote in a decision made by the City of York Council planning committee, in December.
An appeal on that decision has now been dismissed and a local group hopes to buy the pub to operate as a not-for-profit community hub.
Planning inspector Alison Partington ruled there was “insufficient evidence to show that the property could not continue to trade profitably as a public house”.
She said the loss of the pub could not then “be considered to be necessary in this respect.”
Support for the pub had revealed that the Tavern was “a place that a significant number of local residents clearly value as a family friendly place to meet socially, and have meals in as well as a drink”, Partington said.
The pub was listed as an asset of community value in April 2017.
Partington acknowledged there were other pubs nearby in her ruling and so a loss of the Tavern would not mean an “unacceptable loss” of community value.
Ardent support for the Tavern contributed to the decision to safeguard it. A petition for the building to continue as a pub garnered more than 1,100 signatures, with campaign supporters including the Victorian Society, the Council for British Archaeology, SAVE Britain's Heritage and York Civic Trust.
Partington added: “The demolition of the public house would be irreversible and the harm permanent. In addition, the appeal scheme would have a detrimental impact on the character and appearance of the area.
'Outweigh the benefits'
“All in all, I find that the adverse impacts would significantly and demonstrably outweigh the benefits.”
Anna Shelley, who campaigned to save the pub, said it was a “non-designated heritage asset of strong architectural and historic interest” to the city.
“The Victorian Tudor-style landmark sits in landscaped grounds surrounded by mature trees, and adds greatly to the character of the area,” she added.
Once a family villa, the house was bequeathed to the Church of England Children’s Society and opened as a nursery for toddlers and young children in May 1947.
Nick Love, pub protection officer for York Campaign for Real Ale (CAMRA) said: “We’re delighted that the planning inspector made the correct decision on The Carlton and recognised that although Marston's deemed it not part of their long term business plan, it didn’t mean that is wasn’t a viable pub.
He added: "We believe the pub is a valuable community asset and could thrive under community ownership and a better business model as a free house.
"We're disappointed that Marston's have not responded positively to an offer from a local community focussed business”
Marston's has been approached for comment but had not responded by the time of publication.