A historic building in the middle of Stirling could be saved from terminal decline after supporters secured a £2m grant from the Heritage Lottery Fund.

Cowane's Hospital is a former almshouse set up by famous Stirling philanthropist John Cowane in the 1630s.

It was built to provide shelter for impoverished merchants.

However, in recent years the property has fallen into a state of disrepair through decay and vandalism.

Due to lack of funds and rising costs the 17th century building was recently closed to the public.

The Cowane's Hospital Maintenance Trust says an estimated £3m is needed to secure its future and the pledge from the Heritage Lottery Fund (HLF) is the "best possible news".

The Trust's aim is to transform the property and its gardens into a national visitor attraction and community resource.

Hazel Barton, charity officer for Trust, said: "This is the best possible news. Cowane’s is an important part of our national heritage and it has been terribly sad to see it deteriorate.

"The building and the charity founded by John Cowane have been important to our community for 400 years, providing help and support for others. It’s great that this wonderful building is receiving the helping hand it needs to put it back at the heart of local and national life."

Once restored, the building’s main hall, which is still the meeting place of the Stirling Guildry, will be available for weddings, concerts, parties and events.

Lucy Casot, head of the HLF in Scotland, said: "Cowane’s Hospital has a fascinating history stretching back almost 500 years.

"We are delighted that thanks to players of the National Lottery, HLF can support the development of a project which will capture and share this history, revitalising a rare building at the heart of Stirling’s historic quarter as a tourist attraction and community hub."

Before the Trust can access the £2m it has to develop the detail of the restoration works and the heritage activities. Another condition is that it must find the remaining £1m elsewhere.

If the Trust meets all the conditions, it is hoped work will start on the redevelopment in late 2017.

Cowane’s Hospital stands in the Old Town area of the city, close to Stirling Castle and beside the Church of the Holy Rude where James VI was crowned.