The University of St Andrews has taken the top spot in The Times and Sunday Times Good University Guide, beating Oxford and Cambridge for the first time in the guide's 30-year history.
For several years, St Andrews has had high rates for student satisfaction.
After switching to online learning due to Covid, it registered only a slight decline in satisfaction rates.
And it was four percentage points ahead of any other university for student satisfaction and teaching quality.
In terms of academic research, the Fife institution scored highly in the most recent Research Excellence Framework, especially for its work with the University of Edinburgh on chemistry and physics.
It is also renowned for its marine research, pioneering medical work and the Handa Centre for the Study of Terrorism and Political Violence.
Alastair McCall, editor of The Times and The Sunday Times Good University Guide, said: "St Andrews' achievement in topping our institutional table should not be underestimated. Never before has any university other than Cambridge and Oxford finished top of our - or any other - domestic ranking of universities.
"It is no fluke. The university has been closing in on the Oxbridge duopoly for several years, buoyed by outstanding levels of student satisfaction which have peaked during the past year of pandemic disruption on campus."
He added that the lead St Andrews now had over other universities was "remarkable".
"Its wider contribution as a centre of teaching and outstanding research marks it out as a global player in the international higher education marketplace," he said.
"Strange to say for an institution that has been around for 600 years, but topping our UK rankings for the first time truly marks St Andrews 'arrival' as a serious challenger to Oxford and Cambridge."
Principal and vice-chancellor, Prof Sally Mapstone, said: "I am thrilled for our students, staff and alumni. They are the people who made this happen.
"As one community, we strive constantly for excellence, and have a strategy that hasn't been afraid to believe St Andrews could challenge at the very top by combining the best teaching, world-leading research, and an unswerving commitment to student satisfaction and achievement.
"Of course we'll enjoy this remarkable result, and I expect there may be a little good-natured cross-border teasing amongst colleagues.
"We have been in very good company close to the top of this definitive league table for several years but, until now, always on someone's shoulder."
'Impenetrable Oxbridge ceiling'
Prof Mapstone added: "I hope the fact that the staff and students of a small, Scottish institution have been able to break through the hitherto impenetrable Oxbridge ceiling will inspire others, and show that the status quo is only that if you allow it to be."
Founded in the 15th Century, St Andrews is Scotland's oldest university and the third oldest in the English-speaking world, according to its website.
It counts the Duke and Duchess of Cambridge, known in Scotland as the Earl and Countess of Strathearn, among its most famous alumni.
The University of Glasgow has been named the Scottish University of the Year and is placed 12th in the UK-wide league table, its highest ever ranking.
Prof Sir Anton Muscatelli, the university's principal and vice-chancellor, said: "This represents our best performance in this ranking and is yet more evidence that the university continues to thrive in the face of increased national and global competition in the sector, consolidating our position as a truly world-leading university, both nationally and globally.
"Its scores for student experience and teaching quality held-up well during the pandemic. The university is in the midst of a £1bn campus investment plan, with an Advanced Research Centre due to be completed next year."
The Times and The Sunday Times Good University Guide 2022 includes profiles on 135 universities, using the latest data published in the past two months.