The new £25m Ayr Academy has been officially opened by the deputy first minister.

John Swinney was joined by lord lieutenant of Ayrshire and Arran John Duncan in what was one of his final public appearances before retiring.

The project is part of a £94m pipeline of works being delivered across South Ayrshire in the next year.

Mr Swinney said: "At the outset of our £1.8bn Schools for the Future programme in 2009, we originally aimed to build or refurbish 55 schools across Scotland - we have now more than doubled that commitment and it is fantastic to see so many of these wonderful buildings, like this one here in Ayr, now coming into use.

"More widely, since 2007 we have completed 651 school building projects, which is almost double the amount completed over the preceding eight years."

Mr Duncan said: "This magnificent new campus, with its outstanding cutting edge facilities, will hugely facilitate attainment across the board.

"It will afford both staff and students immense opportunity as they take the ancient name of Ayr Academy into the future, building on the long legacy that name carries. They will shape its future and it will shape their lives."