A former German prisoner of war has left nearly £400,000 to a small Scottish village for the kindness shown to him during his imprisonment.

Heinrich Steinmeyer, a former Waffen SS soldier during World War Two, was captured in France in 1944 when he was 19 and was held at the PoW camp at Cultybraggan near the village of Comrie, Perthshire.

He was classified as a category “C” prisoner – or hardline Nazi – and was held in Perthshire until June 1945, when he was then moved to another unit in Caithness and then a camp in Fife before eventually being released in 1948.

He returned to Comrie regularly after he was freed and made life-long friendships in the area. He died in 2014, aged 90, and his ashes were scattered in the hills above the camp.

Two years on, his wish to leave £384,000 to the village has been recognised and has been donated to the village’s local community trust to be spent on local development for the elderly.

The Courier newspaper said part of Mr Steinmeyer’s will reads: “I would like to express my gratitude to the people of Scotland for the kindness and generosity that I have experienced in Scotland during my imprisonment of war and hereafter”.

Mr Steinmeyer made close friends with a local man in the area named George Carson who died only two weeks prior to his own.

Mr Carson’s son, who is also called George, told BBC Radio 4’s Today programme: “It sounds like an unbelievable story but it’s absolutely true.

“My mother and her friends, all school children at Morrison’s Academy in Crieff, made friends with Heinrich through the fence of the Cultybraggan camp.

“I’m not quite sure how they communicated but during these conversations they discovered that Heinrich had never seen a moving picture, so they went up with their push bikes one morning and one of the girls had taken her brother’s school uniform and they smuggled him out of the camp through the chainlink fence and into the cinema where he saw his very first film and he was absolutely blown away by the whole experience.

“I met him a couple of times and he was a wonderful man.

“He had meetings with the Comrie Development Trust in 2008 and asked them to manage his estate on his death.

“He was quite specific in his will that the money should only be used on the elderly in the village.

“This is his thanks for the kindness shown to him at the point of his life where he was at his lowest and he just wants to say thank you to everybody.”

The money has now been transferred to a Heinrich Steinmeyer Legacy Fund and a consultation process will start to find out how the legacy should be spent.