Edinburgh has been named as one of the best cities in the world to be a student.
According to the table produced by QS higher education data analysts, the capital is the 16th best city to be a student.
The city is listed as the second best city in the UK, behind only London which topped the rankings.
QS named the city's large student population and its internationally diverse community as the chief reasons for Auld Reekie's high ranking.
Edinburgh was also lauded for the standard of education on offer.
"Known for its striking castle, historic old town and massive annual events such as the Edinburgh International Festival and New Year’s Hogmanay street party, the city is also home to several of the best universities in the UK," said QS in a statement on topuniversities.com. "The University of Edinburgh is ranked joint 23rd in the QS World University Rankings 2018 – the joint-fifth-highest UK entry."
Affordable student fees also make Edinburgh an attractive prospect according to the data analysts.
"For undergraduate students from within the EU (except those from England, Wales or Northern Ireland), university fees are entirely subsidized by the Student Awards Agency for Scotland (SAAS). So, depending on where you’re from, Edinburgh could be surprisingly affordable."
5 UK cities in the top 50
Edinburgh was among five UK universites named in the table's top 50.
London topped the table despite "eyewatering living costs" finishing just ahead of Tokyo, Melbourne, Montreal and Paris. Manchester, meanwhile, came in eight places behind Edinburgh in 24th - the English city was hailed for its lively music scene.
Glasgow also made the top 50, being named the 43rd best place in the world to be a student - the city was praised for being welcoming, as well as being home to an exciting student scene.
QS also noted that Glasgow had "shaken off its previously gritty image to become one the UK’s leading hubs of culture, commerce, research and academia."
English cities Coventry and Nottingham also made the top fifty.
Aberdeen, meanwhile was praised for its affordability and listed as the 55th best city to study.
QS best student cities
12. Hong Kong
18. New York
25. Buenos Aires