Councillors have backed plans for a new Madras school at Pipeland Road.
The saga over where to build a new secondary in St Andrews has rumbled for decades.
But only a legal challenge at the Court of Session next week can prevent work from starting ont he greenbelt land.
It's after the North East Fife Area committee voted 8-4 in favour of the move.
Campaigners in favour the project have said they're "thrilled" with the decision.