Plans to build a new Madras College on Pipeland Road are set to go ahead.
Conservation group STEPAL have lost a legal bid at the Court of Session in Edinburgh to block a new school being built on green belt land in St Andrews.
Campaigners had argued that planning rules were broken in favour of educational needs.
STEPAL says its now taking legal advice about pursuing an appeal, saying it has still has concerns about the decision.
Lord Doherty today ruled that the grant of permission was lawful and said there is a pressing need for a new secondary school in the area.
The judge said: "It is not hard to appreciate why the proposed development has given rise to so much controversy. It is significantly contrary to the development plan. Pipeland is in the countryside. It is in the Green Belt. It is prime agricultural land."
"A development of the type and scale proposed at this location would have significant adverse landscape and visual impacts. Serious harm is planning terms is anticipated. On the other hand, there is a pressing need for a new secondary school," he said.
The current Madras College is located on two sites with its playing fields separate and a full Fife Council meeting backed the application for a school on the new, unitary site last year.
The court heard that the current school buildings are unsuitable for current and future use and a great deal of local debate and controversy had occurred over the way forward.
Lawyers acting for the association argued that the local authority had erred in ruling out an alternative site for the new school at North Haugh.
Flooding was among the concerns of North Haugh, along with the A91 splitting the site without a passenger bypass
It was maintained that it had failed to assess the relative planning merits of the alternative options and that St Andrews University was content to sell the North Haugh site.
But the local authority maintained that the grounds of challenge put forward were not well-founded. It contended that the North Haugh land could not accommodate a single site school and it was not large enough to allow for future expansion.
Lord Doherty said: "In the present case the material considerations which are said to justify departure from the development plan are the urgent need for a new secondary school in St Andrews; the fact that the proposed site is available; and the fact no other site is suitable and available."
"It is the last of these considerations which forms the battleground in this judicial review," said the judge.
He said he did not accept the contention that the council overlooked the possibility of the North Haugh site being used in conjunction with playing fields at Station Park.
The judge said he was unable to accept the argument that the local authority had erred in treating the North Haugh/ Station Park proposal as being a split site.
"In my opinion the respondent (the council) was fully entitled to regard North Haugh/Station Park as a split site," he said.
"They are separated by a major A class road, the A91. At present there is no connection between them by way of an underpass, an overbridge or otherwise," he said.
"The planning authority was entitled to approach matters in the way that it did. If the North Haugh/Station Park site was unsuitable then it mattered not a jot that development on it would be more consonant with the development plan than development at Pipeland," said Lord Doherty.
"The weight which the planning authority attached to the disadvantage of the site being split, and of the site being a small one without scope for future development, were matters of judgement for it," said the judge
.
Artwork for the new build at Pipeland road
Fife Council says work on the new build can now begin.
Leader David Ross, welcomed the news saying: "We are very pleased with the decision taken by the court and hope that this will now enable us to move on and deliver a new state of the art school for the children of St Andrews and the surrounding areas.
He said: "The pupils, staff and the wider community of Madras College have been very patient throughout this process but they deserve to have a building which matches the excellence of the school. I'd like to thank them for the support and determination they have shown and assure them that we will be doing all we can to have their school ready for them as soon as possible.”
Councillor Bryan Poole, Executive Spokesperson for Education, Children, Young People and Families, has also greeted the decision, saying it is "essentially about people".
Mr Poole said: "On hearing the result, I’ve tried to put myself in the shoes of the young people going through the doors of the new Madras College in, now, a relatively short time.
"They will enter a state of the art learning facility and will go on to achieve even more than they are currently achieving. And of course it’s not just the current generation of young people that will benefit – the children currently in our primary schools and nurseries will have the full range of opportunities that a new building can provide. And the same goes for the staff at Madras.
"Given the physical learning environment they have been working in, they have over-delivered for the young people in their charge, which was clearly shown in their excellent HMI report. So, of course I’m very pleased with the decision but particularly pleased for the young people and staff who will be going through the door of a new Madras in the near future.’