Heritage campaigners have failed to prevent London's historic Middlesex Guildhall being transformed into the UK's first Supreme Court.
Middlesex Guildhall will replace the House of Lords
Save Britain's Heritage (SBH) wanted Westminster Council's decision to grant consent to alter the building in Parliament Square, overturned.
Opponents said its fine gothic revival interiors may be lost under the plans.
But High Court Judge Mr Justice Collins ruled on Tuesday that no planning rules had been infringed.
Middlesex Guildhall, which is regarded as one of the finest secular gothic revival buildings in England, is currently in use as a Crown Court.
Westminster Council granted planning permission and listed building consent for the change of use of the last November.
Speaking in court on behalf of SBH Joseph Harper QC, said government guidelines stressed a "general presumption in favour of the preservation of listed buildings" and continuation of their existing use if they were not redundant.
He said none of these, and other policy considerations, were put to the planning committee which, he claimed, gave no proper reasons for its decision.
Mr Justice Collins said: "I appreciate many believe the decision to locate the Supreme Court in the old Middlesex Guildhall is the wrong decision."
But he added the council's planning and development committee was entitled to conclude that it was "the right location" for the Supreme Court.
He said it was "necessary and desirable in the national interest" for the alterations to take place.
Westminster Council's councillor Robert Davis said the judge had vindicated their decision.
He said: "Our primary aim has always been to ensure the future use of the Middlesex Guildhall while safeguarding as much as possible of the original building."
The Grade II listed building will be home to the independent Supreme Court, which will replace the House of Lords when it opens in 2008.