St Andrews has been named UK university of the year by The Times and The Sunday Times Good University Guide.

The Fife institution was praised for its quality of teaching and overall student satisfaction.

The University of Dundee won the award for student experience and the University of Stirling took the home the prize for the best sporting university.

St Andrews ranks third among the best universities in the UK, behind Oxford and Cambridge, according to the guide.

The awards are decided using different criteria to the league tables, including the performance of the university that year, progress made in the past 12 months and the levels of initiatives and investments made.

Alastair McCall, editor of the Sunday Times Good University Guide, said: “St Andrews fully deserves to be mentioned in the same breath as Cambridge and Oxford when we talk about the very best that British higher education can offer.

“The league table proves it but more importantly so do its students, who consistently rate St Andrews the best university for teaching quality.”

READ MORE: St Andrews named as best Scottish university as new league tables revealed 

Professor Sally Mapstone, principal and vice-chancellor of the University of St Andrews, said: “Our students see they are going to a university that delivers a high-quality experience all round – high-quality teaching in small groups from tutors who know them and understand their learning trajectory and wider career trajectory.”

Scottish independenceNicola Sturgeon said St Andrews University can help spread the message that Scotland is ‘open and welcoming’ (Danny Lawson/PA)

First Minister Nicola Sturgeon passed on her congratulations to the institution.

She said: “Scotland punches well above its weight in terms of international recognition and institutions like St Andrews play a key role in our standing on the world stage.

“With almost half of its students coming from Europe and the rest of the world it is well placed to take the message that Scotland is an open and welcoming nation to every corner of the globe.”

READ MORE: Students at St Andrews University ‘most satisfied’ in the UK 

On taking the prize for student satisfaction, Dundee University Students’ Association president Josh Connor, said: “This award won’t be surprising for anyone who studies at the University of Dundee.

“We are a community, a family, and that is why our student experience is the best in the UK, because we look out for each other.”

The University of Strathclyde won Scottish university of the year.

Principal Professor Sir Jim McDonald said: “Students are at the heart of everything we do.”