St Andrews University has won third place in a ranking of UK universities.
The survey, compiled for The Guardian, is based on factors including spending per student, staff-student ratio, what grades applicants need to get a place, how satisfied final-year students are with their courses and graduate career prospects.
Cambridge and Oxford universities topped the list with St Andrews rising one place from last year to equal its highest placing in the table.
St Andrews was judged the best in the UK for student satisfaction with teaching.
Its academic schools also performed very strongly in individual rankings, with physics and astronomy, international relations, computer science and mathematics all topping their polls.
Professor Louise Richardson, university principal, said: “While we are all aware of the limitations of league tables, it is, by any measure, a considerable achievement to be ranked first in the UK for student satisfaction with the quality of our teaching.
“I am absolutely delighted that so many of our schools have been judged to be the best, or among the best, in the country.
“This has been a team effort. Academic success is only possible with the engagement of talented and committed students and the support of colleagues in our service units whose dedication to the university is unrivalled.
“Given the wealth and size of so many of our top 10 UK competitors, this is a notable result for St Andrews, a vindication of our small scale, high quality approach, an indication of where we are going as a university, and an endorsement of the quality of Scottish higher education.”
Dundee University came 47th overall, but at subject level it was named first for dentistry and fifth for medicine.
Professor John Connell, vice-principal and head of the college of medicine, dentistry and nursing, said: “The achievement of the school of dentistry in being placed first in the UK in the Guardian league tables is a fantastic accolade and one that reflects on the overall commitment of our staff and students in making this a very special place to study dentistry.
“In medicine we are again placed in the top five in the UK, a position Dundee has held for the last five years.
“The placing reflects the outstanding quality of the course and the excellent student experience that is available here.”
Stirling University was 63rd in the rankings while Abertay University came 101st out of 116, although 84% of its students questioned said they were satisfied with their course.
In its profile of Abertay, the Guardian said: “It offers world-leading courses in computer arts, ethical hacking, computer games technology and environmental sciences and has some of the best IT facilities in the UK.”