A security adviser has been jailed for five years for stockpiling weapon parts at his home after witnessing the aftermath of ISIS atrocities.

William Cavanagh, 47, who worked across the Middle East for "high value assets" and multinational companies, bought the gun parts over the internet and had them shipped to his home in Airdrie.

He claimed he was building a ballistics testing range to find materials which could be used for home protection in conflict zones such as northern Iraq.

The qualified engineer said he was motivated to find protective building materials to sell through his security firm after seeing the injuries inflicted on people by ISIS.

When police raided his marital home they found weapon parts in his garage, including pieces for AK47 and AR15 assault rifles.

Cavanagh claimed he only bought the pieces to try out a clamp for holding guns at his planned testing range.

He said he had no idea it was illegal to own parts of firearms that could not shoot and said he was going to apply for a firearms licence in due course.

He took the stand yesterday at the High Court in Aberdeen to plead his ignorance of the law in the hope of avoiding the mandatory minimum sentence of five years for firearms offences.

But he was jailed for the full five year term after the judge ruled he had shown "wilful blindness" towards firearms legislation.

Lord Burns said the case did not meet the required 'exceptional circumstances' to merit a lesser sentence.

The judge said: "I'm not satisified that lack of knowledge in your particular circumstances would amount to 'exceptional circumstances'.

"Moreover it seems to be a case of wilful blindness.

"You are a person who clearly has an interest and knowledge of firearms.

"Furthering business enterprises seems to be outwith the scope of exceptional circumstances."

Cavanagh was caught with the weapon stash at his home after the UK Border Force intercepted a parcel in June 2014 addressed to him from a major American gun firm.

When police were alerted to the delivery, they discovered Cavanagh did not have a firearms licence, so the home he shared with his wife was raided in July last year.

Among his stash were parts to an AK47 and AR15 rifles, as well as a single shot pistol, and a 4.5mm revolver.

Some of the illegal weapons were described in court papers as being capable of "discharging two or more" projectiles without repeated pressure on the trigger.

He pleaded guilty to a string of firearm charges when he appeared at the High Court in Glasgow in June, while he still headed a security firm called Lynx Development Systems.

But his lawyer claimed there were "exceptional circumstances" behind the possession which could justify his client avoiding the minimum five year jail sentence for firearms offences.

Cavanagh claimed it was part of a "business opportunity" for his security and surveillance firm that came up after visiting Kurdistan.

He told the court: "I was there during the time when ISIS invaded.

"I saw, although not first hand, the things that were they were doing to ordinary people.

"I had a feeling that you could come up with something that could provide some sort of defence."

He added: "I looked at various types of material and how I would be able to test it.

"The only way I could see was to try and shoot it.

"It was more of an engineering, altruistic project because of the injuries I had seen."

Advocate depute Tim Niven-Smith accused Cavanagh of rushing his project in order to make quick cash from the political tensions in the Middle East, which he denied.

However Cavanagh did admit that he was not running his business as a charity and that he would have sold his protective materials if successful with the project.

Mr Niven-Smith said: "Are you aware of the programme Dragon's Den? I think at this point the dragons would say 'I'm out'."