A High Court challenge to a plan to redevelop the Victorian house where Sir Arthur Conan Doyle wrote The Hound Of The Baskervilles has succeeded.
Author John Gibson, founder of the Undershaw Preservation Trust, attacked Waverley Borough Council's September 2010 decision to allow owner Fossway Ltd to divide Grade II-listed Undershaw into eight separate homes.
The building, at Hindhead Crossroads near Haslemere, Surrey, was used as a hotel since the 1920s and left empty in 2005, falling into disrepair.
Today, Mr Justice Cranston said that, because of legal flaws, the council's decisions to grant planning permission and listed building consent must be quashed.
There was strong public support for preserving Undershaw, which the author designed and where he lived from 1897 to 1907, completing 13 Sherlock Holmes stories in that time.
The 1,360 objections to the proposal included those from the Victorian Society, local MP and Culture Secretary Jeremy Hunt, ex-chairman of the Arts Council Sir Christopher Frayling, Julian Barnes - who set his Booker Prize-nominated novel Arthur And George in Undershaw - writer Ian Rankin and broadcaster Stephen Fry.
The council, which is to pay Mr Gibson's agreed costs of £20,000, was given time to consider whether to appeal.
Mr Gibson, who also gained support from Mark Gatiss, co-creator of the BBC's Sherlock, said after the ruling: "This has been a long and difficult battle to save Undershaw and we are absolutely thrilled with the decision to quash planning permission to redevelop the property.
"This is a place which is steeped in history and should be treated with reverence.
"Conan Doyle's life and works are a fundamental part of British culture and arguably their stock has never been higher.
"We have been absolutely delighted to see enthusiasts from across the world get in touch and pledge their support to our efforts.
"We are very hopeful that this decision will signal a sea-change in attitude towards this historic property and that it will lead to it being rightly preserved as a single building - hopefully as a museum or centre where future generations can be inspired by the many stories which have been created within its walls."
Echoing the great fictional detective, solicitors Irwin Mitchell, which represented Mr Gibson, said the council made "elementary" errors.
Andrew Lockley, head of public law, said: "We have had long-held concerns that basic errors were made by Waverley Borough Council in its decision to grant planning permission on Undershaw and this view has now been absolutely vindicated.
"The local authority failed to ensure that it received English Heritage's views on the plans before taking its decision, despite consultation with English Heritage being a legal requirement due to the property's Grade II-listed status.
"In addition, the council failed in its duty to reconsider the Fossway development plans following the submission of a second application on the property which would see it maintained as a single dwelling.
"Today's decision means it is now back to the drawing board in terms of the future of Undershaw but, like John, we hope to see this property of huge cultural and historical significance preserved and treated in the manner it deserves."
The judge said Conan Doyle constructed Undershaw after choosing the location as particularly suited to the needs of his consumptive wife, Louise.
Before Louise's death in 1906, his remarriage and move to Crowborough, he entertained many friends at the house, such as Peter Pan author JM Barrie and Dracula creator Bram Stoker.
In a 1907 article, Stoker described Undershaw as having "all the elements of home" and said the view from the drawing room was one of "a never-ending sea of greenery" to the South Downs, about 20 miles distant.
Conan Doyle did not sell Undershaw until 1921 and, in 1977, it was listed as being of special architectural and historic interest by virtue of its literary association rather than its unexceptional architecture.
The integrity of the original design had been severely compromised by an early 20th century extension.
The judge said Fossway had clearly bought the property, in 2004, for its development potential and its scheme for the house included a gazebo within the grounds, which would be open to the public and provide information about Conan Doyle.
The judge said lawyers for the council had made it clear that it wanted to preserve Undershaw, which was apparent from the substantial sums spent to make it secure in the light of its neglect by Fossway.
The real issue was how best to achieve that aim for the long term and without the risk of continuing uncertainty.
On the evidence, the ideal of returning it to a single dwelling was not on the cards and, that being the case, the planning officer had adopted a realistic and achievable line, it argued.
There were disadvantages to the Fossway proposals, but the prize was the preservation of the building in the main, and the link with Conan Doyle.
The desirability of preserving the listed building, its setting and its features of special architectural and historic interest lay at the heart of the determination of the applications, said the council.
The judge concluded that the council's arguments did not adequately meet the requirements of the statutory mandate to pay special regard to the preservation of heritage assets and planning policy.