A Highland castle with a bloody past reopened to the public yesterday after a three-year programme of safety and conservation work by Historic Scotland.

The 15th-century Auchindoun Castle near Dufftown in Moray was built for John, Earl of Mar, but he was imprisoned by his own brother, King James III, in 1479, and died in Craigmillar Castle south of Edinburgh.

Auchindoun Castle passed to Thomas Cochrane, one of the king's favourites, who himself came to an unpleasant end when he was hanged from Lauder Bridge in 1482 by jealous noblemen.

The castle later became a stronghold of the Gordons, but it was sacked and burned by the Mackintoshes in 1591. It was repaired, but was abandoned by the 18th century when its stone started being used for local building projects.

The site was closed in the 1960s due to the danger from falling masonry. But the reopening means people are now able to explore the castle once again. Like most Historic Scotland properties it will be unstaffed and is free to enter.

Mike Pendery, Historic Scotland district architect, said: "We are absolutely delighted that this important part of Scotland's heritage is officially open to the public once again.

"Our stone masons have done a fantastic job in making Auchindoun safe for visitors."