A string of iron age hillforts that dot the landscape of the English West Country are to be rejuvenated as part of a lottery award worth almost £1m.

Thirteen hillforts in Dorset and Wiltshire, which are important for their flora and fauna, especially their butterflies, as well as their rich history, will benefit from the money. The National Trust will use the funds to tackle erosion to paths and ramparts and improve fencing so that cattle can graze the areas in the summer and sheep during the winter.

As part of the project, volunteers will help by removing ragwort from the slopes of the forts and and assist rangers as they try to encourage more wildflowers to grow there. Among the sites that will benefit is Hambledon Hill in Dorset, which the National Trust bought in 2014.

The site is important because it has not been damaged by modern farming techniques but the trust says it needs constant work to make sure it is not taken over by thorn and scrub.

Two of Britain’s rarest butterflies, the chalkhill blue and the adonis blue, flit around the south- and south-west-facing slopes and once the sun has dropped in the summer glow-worms appear.

The National Trust ranger Clive Whitbourn said: “The hillforts protrude mysteriously from the landscape. They are thousands of years old and reveal much about the way of life of our ancestors. Due to scrub encroachment and erosion, urgent action is needed to protect them for the future for everyone.

“The work we will be doing together with a small army of volunteers will include scrub removal, fencing and improving access to visitors. This will result in better care of chalk grassland habitat and help attract more wildlife.”

In total £800,000 raised by the People’s Postcode Lottery is being given to the National Trust by Postcode Earth Trust. Of this £100,000 will go to the Wessex Habitats and Hillforts project. The remaining £700,000 will be spent on other conservation projects including the restoration of wildflower meadows and apple orchards at the Brockhampton estate in Herefordshire and the charity’s Riverlands project to improve waterways across the UK. Money will also go towards funding heritage open days.