The maze of roof sections and repairs is putting Bletchley's interiors in danger of damage
Britain's code-cracking and computing heritage has won a lifeline in the form of a donation from English Heritage.
The grant of £330,000 will be used to undertake urgent roof works at Bletchley Park - where Allied codebreakers worked in World War II.
Discussions are also in progress on a further three-year, £600,000 funding programme for the historic site.
The donation follows efforts to highlight the dilapidated state of the huts and other buildings at Bletchley.
The rooms of the Grade II-listed mansion, replete with painted ceilings, timber panelling, and ornate plasterwork, are at risk because the roof has been patched rather than renovated so many times during the 130 years of the mansion's history.
The work funded by the grant is projected to finish in March.
"Bletchley Park played a fundamental role in the Allies winning the Second World War and is of great importance to the history of Europe," said Dr Simon Thurley, chief executive of English Heritage.
"English Heritage is committed to saving this fascinating group of buildings so that future generations can understand something of the enormous human endeavour which went on there."
In July about 100 UK academics signed a letter to The Times condemning the neglect of Bletchley.
The Bletchley Park Trust has raised more than £5m since taking over the site in 1992. It is in ongoing talks with English Heritage, as well as the Milton Keynes Borough Council, to raise a further £600,000.
English Heritage has pledged £100,000 a year for the next three years if its partners in the deal can match those funds.
The sum would be put toward a rolling programme to restore the huts that housed the World War II codebreakers who cracked many of the codes used by the German.
The cash from English Heritage follows a donation by hi-tech firms IBM and PGP to the National Museum of Computing which shares the Bletchley site.