St Andrews University has been gifted £7.7m from the Canadian parents of a student who graduated in 2010.

The unprecedented amount was donated by Frank and Beverley MacInnis, whose son Robert earned a PHD in computer science eight years ago following on from his BSC in 2005.

It is believed to be one of the biggest single financial pledges ever made to a university in Scotland.

The money will be used to support St Andrews' new Scottish Oceans Institute and a PhD scholarship in physics and astronomy.

Frank and Beverley, who are both natives of Alberta, Canada, built a house in St Andrews in 2016 and visit regularly.

Robert is now based in New York as an expert in distributed systems and pioneer in computing.

Frank said: "Beverley, a former teacher, and I recognise the transformative powers of education, and the important difference philanthropy can make.

"When we spoke to Principal Mapstone about her vision for St Andrews, we had an immediate sense of engagement with her plans for the university.

"We are delighted to make our family's support known at this time, and it brings us pleasure to help enable world leading research at St Andrews."

St Andrews principal and vice-chancellor Professor Sally Mapstone said: "This wonderfully generous gift from Frank and Beverley MacInnis enables us to launch the new strategy for the University of St Andrews with confidence and strong belief.

"Frank and Beverley share our commitment to education, to our community, local, national, and international, and to transforming lives for the better.

"They are our friends and our advocates in equal measure."