Almost 200 jobs have been saved at the National Trust for Scotland after it was awarded £3.8m by the Scottish government.
The money is designed to help the charity, which looks after places such as Culloden and Brodick Castle, recover from the impact of Covid-19.
It will also help the NTS open 33 sites this month – five more than planned.
Despite the windfall, 232 redundancies are still expected to be made by the organisation.
The conservation group’s income has been decimated by the closure of properties and and it has seen revenue from membership, investments and fundraising plummet.
In May, the trust said its future was in doubt and it would look to sell off non-heritage land and property.
As part of the new deal the NTS has been told it must work with the Scottish government to consider the long-term sustainability of its operations and review its business model for future challenges.
Culture Secretary Fiona Hyslop said the lockdown has been a “deeply difficult” time for the trust and vowed any government support was designed to support staff.
She said: “The severe impact of the pandemic means that unfortunately not all jobs can be saved but this funding will go far to protect as many critical roles across the National Trust for Scotland estate as we can.
“The funding will also ensure that some sites proposed for long-term closure by National Trust for Scotland can instead be reopened, and enjoyed once again by communities.”
Ms Hyslop said the organisation is responsible for promoting and protecting many of Scotland’s most important natural and built sites, which are crucial to the heritage and tourism sectors.
And she pledged to work with its new leadership so it is in a position to continue its “vital work” in the future.
The conservation organisation manages or owns about 130 properties in Scotland, including St Kilda, which is Unesco world heritage site.
About 40 places have reopened, including Glencoe visitor centre and Robert Burns Birthplace Museum, but smaller venues like Broughton House in Kirckcudbright remain closed.
It is expected to make 188 compulsory redundancies and 44 voluntary redundancies.
NTS chief executive Phil Long welcomed the funding which comes during the “worst crisis” in the charity’s 90-year history.
But he added: “My joy at this announcement is tempered by the fact that the devastating effects of Covid-19 mean we still must say goodbye to friends and colleagues.
“I wish it were not so, but redundancies are unavoidable, although this support helps keep them to the absolute minimum.”
Mr Long said the organisation has been left with a “resilient operating model to weather continuing uncertainty”.
Richard Hardy, of Prospect union, paid tribute to those who had campaigned for government intervention and welcomed the funding.
But he added: “At the end of the day however, we cannot and should not lose sight of the fact that over 200 people are still losing their jobs and this is bad news for the economy, for heritage and for Scotland.”
The money is part of the £97m in UK government consequentials for the culture and heritage sector.