Gas heating is to be eliminated from all Historic Environment Scotland (HES) buildings, including Edinburgh Castle, by 2032, it has been revealed.

HES said it aimed to be “net-zero” by 2045, in line with the Scottish Government’s target.

The organisation also plans to reduce the amount of visitor vehicles by 2028 by creating parking hubs where it has clusters of properties.

The initiatives are part of a new action plan unveiled by heritage chiefs this week to preserve Scotland’s historic places in light of the threat of climate change. HES said sites “representing more than 5,000 years of history” will be “involved in the fight against climate change”.

Bosses hope to use the “unique potential of Scotland’s iconic historic sites to inspire climate action and drive positive and sustainable behaviour change through the new plan”.

Investment will also be made in cycling infrastructure for staff and visitors. Use of taxis will be curtailed with an aim to reduce use by 80 per cent by 2022.

Ewan Hyslop, head of technical research and science at HES, said: “We are in the midst of a global climate crisis, and Scotland’s historic sites are already feeling its impacts.

“We need to take significant and urgent action now to protect our past for the future, and this new plan sets out how we will build on our previous success in areas such as energy efficiency, emissions reduction and impact assessment, and encompass broader actions around areas such a sustainable procurement, circular economy and biodiversity.

“We can’t face the climate crisis and its impact on the historic environment alone, and the plan outlines how we will work collaboratively with others locally, nationally and internationally to pool expertise and share knowledge.

“Through innovation in areas such as research, training and education, and by supporting new approaches to sustainable travel and tourism, we will place Scotland and our historic environment at the forefront of the global movement to tackle climate change.”

HES is the country’s largest operator of tourist attractions, preserving places including royal seat Stirling Castle, Roman relic the Antonine Wall and the ancient Crossraguel Abbey.

Climate change is now recognised to be amongst the fastest-growing threats to cultural heritage and historic sites worldwide, with increased rain and erosion one of the main threats to stonework on historic buildings.

Once home to the Red Douglas dynasty, coastal Tantallon Castle near North Berwick is amongst the sites at risk. Culture Secretary Fiona Hyslop, who was at the launch of the report, said: “The historic environment has a critical role to play in our response to the global climate emergency.

“This Climate Action Plan recognises the scale of the challenge we face and the need for immediate and widespread action. I welcome the commitment Historic Environment Scotland is making to meeting our ambitious emissions targets and look forward to seeing the results of its work in the coming years.”

Jane Ryder, chair of HES, commented: “In the past year international heritage experts have come to Scotland to work with us to develop pioneering methods to better understand the climate-change threat to world heritage sites.

“In addition to piloting some groundbreaking approaches, we’ve hosted the launch of a new international network which has united cultural heritage organisations from across the globe to take action against climate change.

“As Scotland prepares to host COP26 later this year, we want to demonstrate that our nation’s past has a crucial role to play in delivering a green, low-carbon, sustainable future for all.”

The initiative comes as Scotland’s biggest conservation charity mounted a multimillion-pound operation last month to protect its properties from the effects of climate change.

The National Trust for Scotland said it would try to raise millions to repair weather damage to landmarks such as Robert Burns’s birthplace, Charles Rennie Mackintosh’s Hill House and the Mar Lodge estate in the Highlands.

In January the trust began an audit of more than 80 properties to try to contain the rising bills.

It said that leaks caused to historic buildings by extreme climate events are rising, properties are becoming more prone to flooding and income is suffering as visitors are unable to get into the homes and gardens.

And this week scientists from the University of the Highlands and Islands were awarded nearly £1 million to undertake research into the peatlands of northern Scotland, which are being mooted as a UNESCO world heritage site.