An ancient pine forest featured in the Harry Potter film series has been bought by the local community.

Loch Arkaig pine forest near Spean Bridge in the Highlands has been sold for £500,000 by Forest Enterprise Scotland under the National Forest Land Scheme.

It gives community organisations first refusal to buy land but the sale had to be concluded this winter or the forest could have been sold on the open market.

Woodland Trust Scotland joined forces with Arkaig Community Forest to purchase the 2500-acre forest, which was seen in Harry Potter and the Deathly Hallows: Part 2 when Harry, Ron and Hermione flew over it on a dragon.

Gary Servant, of Arkaig Community Forest, said: "This is a great moment. The land has been bought and we have a fantastic opportunity to work together to restore these native woodlands and to reconnect local people with their forests.

"Everyone is very excited and we give heartfelt thanks to all who have supported us and have contributed to the appeal."

The Woodland Trust wants to restore the forest, which is said to have been damaged by felling, overgrazing and the planting of non-native conifers, which will be removed over the next 20 years.

The forest will also be surveyed to identify wildlife hot spots which will be expanded through woodland management.

Carol Evans, director of Woodland Trust Scotland, said: "We are going to consult widely on our detailed plans for the wood.

"We want to see this special place established as a benchmark for the joint regeneration of both its native forest and local community."

An appeal was launched in April to raise £500,000 to buy the forest.

Simon Hodge, chief executive of Forest Enterprise Scotland, said: "This was one of the last applications to the National Forest Land Scheme.

"It has been great to see the way Arkaig Community Forest and Woodland Trust Scotland have worked in partnership to achieve their joint aims.

"I hope this success inspires other community organisations to consider how they might be able to develop similar projects under the new Community Asset Transfer scheme."