A trust hoping to move a music school into Edinburgh's Old Royal High School has made an offer of £1.5m for the historic building.
The Royal High School Preservation Trust plans to move St Mary's Music School into the neoclassical Thomas Hamilton buildings on Calton Hill.
The trust made the offer with the backing of the philanthropic Dunard Fund.
The move follows plans by developers for a £75m five-star hotel at the site.
Architect Gareth Hoskins, who redesigned the National Museums of Scotland, has designed plans for the hotel.
The Category A listed building, which overlooks the capital from Calton Hill, was built by Thomas Hamilton in 1829 but has been largely unused for decades.
The trust has appointed architect Richard Murphy to develop designs to restore the site as a school, alongside conservation architects Simpson & Brown.
It said it was due to submit plans to the City of Edinburgh Council following two public consultations.
Making the announcement alongside Dr Kenneth Taylor, headteacher of St Mary's Music School, William Gray Muir, the chairman of the Trust, confirmed that a bid to purchase the Old Royal High School for £1.5m had been made, exceeding the value currently put on the buildings by Edinburgh city council.
It is a small part of funding which has been made available to the Trust to underwrite the cost of a conservation and conversion of the building.
Mr Muir said: "The Old Royal High School buildings are crucial to the character of Edinburgh and part of the architectural heritage that attracts people to this wonderful city.
"The trust was set up specifically to conserve and protect this masterpiece for the long-term and what better way than to restore it to its original purpose as a school?
"St Mary's Music School needs a new home and, if we are successful, not only will this move ensure the school will have more teaching and performance space but as a new venue and destination for talented musicians it will also create opportunity to add to Edinburgh's cultural economy."
Dr Kenneth Taylor, headteacher of St Mary's Music School said: "This is an exciting and wonderful opportunity for us to further develop Scotland's only independent specialist music school.
"Moving to the former Royal High School building would provide us with the performance and rehearsal space we aspire to and would enable us to broaden and extend the outreach activities we currently offer to the wider community."
The Old Royal High School was vacated in 1968 when the school moved to Barnton.
During the 1970s, it was proposed as the site to house a devolved Scottish Assembly.
However, the 1979 devolution referendum did not result in an assembly and when the Scottish Parliament was finally set up in 1999 a new site was chosen.