The new school will be built on common good land at Roysvale Park, between the existing school and Applegrove Primary School, and will include community and sports facilities for public use outside of school hours.

A total of 134 representations were received in relation to the plans, 110 of which were objections.

Those against the plans said it would cause traffic issues, and see the loss of vital playing fields.

Moray Council said the new school represented a “significant and positive opportunity to replace the existing school with a modern, fit-for-purpose facility.”

The area’s planning and regulatory services committee gave the project its approval at a special meeting.

Funding will be shared by the council and the Scottish government through its LEIP education funding programme.

Committee chairman David Gordon said: “We recognise how important the future of the school is to the community, and I’d like to sincerely thank those who have shared their views and contributed throughout this process.”