For more than 60 years, it was a school for ordinary city children who learned in the shadows of Edinburgh Castle.
Castlehill Primary opened in 1888 to serve children living in the Old Town, then a heavily residential area heaving with overcrowded tenements, wynds and closes.
It was closed down after the Second World War as the surrounding streets steadily emptied of people.
Now, the old school building is now home of the Scotch Whisky Experience, which pulls in more than 500,000 visitors a year.
The site was purchased by the whisky industry in the late 1980s with the attraction set up within its walls.
Soon, the final piece of the old Castlehill Primary, the former house of the janitor, who also served as an air raid warden in the neighbourhood, will open as a suite for VIP visitors learning more about their drams.
The history of the building has long been of fascination to Alastair McIntosh, chairman of the Scotch Whisky Experience, who has spent many hours examining the old school rolls to build up a picture of its former life - and the changing face of the Old Town.
Mr McIntosh said: “There used to be tenement buildings on the school site, which were of a pretty sorry state of repair.
“They were demolished and the school was built to accommodate 899 children which gave them the equivalent of eight square feet each. It was extraordinarily crowded.”
Records show that outbreaks of illness, such as diptheria and whoooping cough, closed down the school on occasion.
A hint of the conditions around the Royal Mile in the 19th Century can be gleaned from records of The Ragged School, which opened on the same street around 40 years earlier.
The school was opened by Dr Thomas Guthrie, A Free Church of Scotland minister, in response to the hardships faced by many children found hanging around the Old Town at the time.
Of 500 children taken from the streets, Dr Guthrie reported that 140 had no father, 89 had no mother and 66 were motherless and living with drunken fathers. Meanwhile, 77 were fatherless with drunken mothers.
Many had been abandoned by their parents, with 271 begging on the streets in order to survive.
Castlehill Primary, run by the local authority, was set up around the same time as the Royal Mile Primary in Canongate.
Records show how Castlehill was changing fast in the mid 19th Century. Major physical works were taking place, including the demolition of the former palace and chapel of Mary of Guise, regent of Scotland, which sat a short distance easy from the school site.
It was pulled down to make way for the Free-Church General Assembly Hall.
Mr McIntosh added that the Old Town’s residential status only started to change in the past 60 years or so.
He said: “The population dropped particularly during the war years and the school was closed altogether during World War Two.
“The school was reopened in 1947 but it never really recovered from the war.”
The school closed down in 1951 and decayed over several decades until it was purchased for the visitor attraction.
Only few traces of the old school interior can be found but one feature has remained - the double staircase that kept boys and girls separated while moving around the building.
A spirit of learning has also remained at the old school site, Mr McIntosh said.