
A world class university and the home of golf in a pretty coastal town underline the appeal to many of living in St Andrews.
But the Fife town is in the grips of an affordable housing crisis, where property prices are being stoked by the influence of wealthy buyers from outwith Scotland.
New data shows nearly one in five properties in St Andrews were registered to an address outside of Scotland when purchased, including 164 buyers from the United States alone.
Locals say more needs to be done to improve the balance between serving the town's much-valued students and tourists, and its permanent residents.
The last census put the population of St Andrews at just over 16,000.
But on its busiest days, walking through the town can feel more like navigating the centre of a busy European city.
For locals, the economic benefits of the town's appeal to visitors are clear but the knock-on effect for house and rental prices is taking its toll.
Fife Council has said finding reasonably priced housing in St Andrews is a "major challenge" and has put in measures such as quotas of affordable housing in new developments to try and help.
And the town's university has capped its student numbers at around 10,000 for nearly a decade now because of the pressure on housing and other local amenities.

Francesca Bisi, a fourth year PhD student in the School of Art History, knows all about these pressures as she is commuting to her studies from a nearby village after being unable to get affordable accommodation in the Fife town.
"It has been really stressful to try to navigate the housing market here, and even in my fourth year it's something that is still causing a huge challenge," she said.
''It distracts from my work, distracts from my studies and really takes a huge toll on my mental health as well.
"I know that any savings that I've been able to put aside that year always end up being drained in whatever down payment because in this market you know you can't really afford to be picky with what you find and you just feel lucky that you found any place at all.''
Average advertised rents in St Andrews over the last year have been £1,702 per month, compared with the Scottish average of £1,245 per month, according to data from property firm Rightmove.
Amy Elvins, of the St Andrews University Students' Association, said this has caused a disparity in a housing market dogged by a lack of supply.
She said: "The high rents in St Andrews have ultimately meant that all power lies with landlords, which means that students are potentially having to work full time.
"It has created a market in which the understanding is that all houses in town will be filled so it doesn't really matter the standard and the price that they are.
"It means that members of the community are also being priced out and what we ultimately need is more affordable rentable housing."
Where are property buyers in St Andrews from?
The vast majority of property and land in Scotland is registered to people and companies based in the country.
But Registers of Scotland (RoS) data shows a total of 28,825 titles - 1.4% of the total - on the land register where the owner had an address outside the UK at the time of purchase.
Figures released to BBC Scotland shows that in the KY16 8 and KY16 9 postcodes in St Andrews, 5,494 of the titles in the land register were lodged with people or firms based in Scotland at the time of purchase - 81% of the total.
A further 845 (12%) were registered to addresses in the rest of the UK, and 444 (7%) were outside the UK.
A breakdown of the properties registered overseas shows they went to a total of 51 different countries or crown dependences, including Russia and the Cayman Islands.
A total of 164 St Andrews titles went to a United States address (37% of all overseas registrations), followed by Switzerland (30) and Hong Kong (28).
RoS data shows that St Andrews is ranked fourth out of the top ten postcode sectors in Scotland with the most overseas buyers.
Areas of Edinburgh make up the nine other top ten postcodes, with the top place being the Quartermile development, where more than a third of the properties in the development were bought by people based overseas.
St Andrews is a 'hot' property market

Local estate agents have reported a steady trade in wealthy parents buying local homes for their children to live in during their time at university, as well as people attracted to the town by its golf courses.
Data from property firm Rettie shows the average sale price for houses in St Andrews over the last 12 months was £482,879 - more than twice the Scottish average - and up from £312,464 a decade ago.
Dr John Boyle, the firm's director of research and strategy, said the Fife town was a "hot market in a Scottish context".
He added: "When the tourists come here they think this might not be a bad place to retire to.
"So you've got a lot of downsizer demand within the community and you've got the university setting so both a lot of students and a lot of staff.
"St Andrews along with [Edinburgh's] New Town, Morningside and west end Glasgow, it's the handful of real prime areas across the country
"It's very sought after by a whole range of different buyers including buyers that have got significant amounts of money to go and spend on finding a place to live there."
Locals want 'sensible conversations' about the future

Ben Stuart, director of residential and business services at the University of St Andrews, highlighted its annual £480m contribution to Scotland's economy, supporting 9,000 jobs in the Fife and Tayside area.
He said: "St Andrews obviously borders with the ocean and green belts. There's not a lot of space left to provide that type of housing.
"All entities have to get together here and understand how they can relieve the pressures.
"Students are often unfairly blamed for the housing situation, when evidence shows it is a much more complex picture."
Stuart said this was reflected in property prices and the trends identified by BBC Scotland News.
He added: "Quite often, those with the deepest pockets are simply outbidding - by a substantial margin - locals who try to acquire property in town.
"And often those with the deepest pockets are from overseas."
Debbie MacCallum, a local entrepreneur and chairwoman of St Andrews Business Improvement District, said the town's international profile supported thousands of jobs and was "hugely valuable to our local businesses and the wider economy".
She added: "However, a globally recognised town also has to work for the people who live here all year-round and St Andrews is, first and foremost, a community.
"As demand for property grows, we need to continue having sensible conversations about how we balance the benefits of international investment with the need for homes, businesses and services that support a thriving local community."

The big looming change in the local housing market is new developments on the town's outskirts that will deliver more than 1,000 new homes.
This will increase the overall supply but John Mills, head of housing for Fife Council, also pointed out that 30% of the homes on these sites would be affordable housing.
He added: "We know that finding affordable housing in St Andrews is a major challenge and there is no single solution.
"That's why we're taking a range of steps to help improve housing options for local people."
Mills pointed to polices such as control areas for the number of short-term lets and an ongoing review of how key workers are allocated council housing.