The University of Dundee has been ranked as the best in Scotland, according to a newspaper survey of students.
And the university came 5th in the whole of the UK in the Times Higher Education poll - up from 8th last year.
The survey ranks 113 UK universities on all aspects of student life - from academic quality to social facilities.
The university said offering the best possible student experience was an "absolute priority".
Professor James Calderhead, the university's vice-principal, said: "It is a credit to all staff across the institution and also to the students' association, with whom we have a very good relationship and who work very hard to help deliver quality to students in all aspects of campus life."
The university scored among the top marks in the sections on social life and extracurricular activities.
Chris Browne, deputy president of Dundee University Students Association (Dusa), said: "The past few years have seen improvements in areas such as the library and learning centre, halls of residence, employability and the amount of activities offered to students on campus.
"Dusa play an important role in the student experience, providing a central hub on campus with excellent social activities and valuable advice and support services."
Mr Browne added that the union welcomed the changes made by the university to improve student life
The Times Higher Education supplement said that more than 13,000 students had taken part in the survey.
Loughborough University was ranked first in the UK, followed by the University of Sheffield and the University of East Anglia.