Up to 400 new homes are to be built close to a National Trust property after a ruling at the Court of Appeal.
The 17-hectare development near the Grade I-listed Kedleston Hall in Derbyshire was initially approved but later overturned after opposition.
However, a judge did not find a flaw in a government planning inspector's approval in 2016 and upheld the plans.
The Georgian house is considered to be one of the finest examples of 18th century architecture.
The development site, on farmland off Kedleston Road and Memorial Road, is 550 metres away from the edge of the hall's parkland.
The judge rejected claims that the inspector took a too narrow approach to defining "the setting" of the hall and gardens and confirmed the planning permission.
In 2017, a High Court judge overturned the application after the Kedleston Voice campaign group challenged the decision.
The judge said the inspector had failed to focus on the "historic, social and economic connections" between the hall and the site.
Historic England, the National Trust and the Gardens Trust had also objected to the development.
Developer Catesby Estates Ltd had appealed against the decision.