The crime gang kidnapped and brutally tortured a man over money they thought he owed them, the High Court in Glasgow heard.

Drug dealer Robert Allan became a target after meeting Barry O’Neill in March 2013 in connection with a £45,000 cocaine haul.

Allan later complained about the “quality” of the drugs and it was agreed with a member of the crime clan he could return some of the drugs – but had to pay £30,000.

But, when he was later unable to stump up the cash, Allan fled Scotland for Barnsley but was tracked down.

READ MORE: Scotland's hi-tec gang used sophisticated devices to try and foil police

David Sell turned up at his door – joined initially by two other armed men – and sat on a couch beside the victim and trained a handgun at him.

The court heard Allan had his chest, arms and ankle bound together with a chain. One of the men said to him: “It’s not about the money. It is the f****** principle.”

Allan was later bundled into a van and driven hostage to a desolate industrial unit in Fauldhouse, Midlothian.

It was there Sell acted as a “guard” in between the victim being brutally beaten.

Mr Allan was then whipped with a thick chain, smacked with a metal bar and left with a broken leg after being battered with a 14-pound sledgehammer.

One the group went on to say: “Are you alright? Don’t want you f****** dying. Don’t want to be up on a murder charge.”

With a fifth man now on the scene, the victim was ordered to strip – before being sprayed with bleach.

The liquid seeped into his painful wounds causing further agony.

The court heard Mr Allan stood “naked, wet and humiliated”.

But, the ferocious violence continued with a hooded Allan – also suffering a broken cheekbone – transported to a rural spot near East Kilbride. Sell was not present – but two of the other men pulled him from a car and pinned him down.

Mr Prentice: “Robert Allan was then shot three times – twice in one knee and then the other.”

READ MORE: Scotland's hi-tec gang used sophisticated devices to try and foil police

Mr Allan was dragged to the top of a hill and ordered to roll down. As the attackers left, members of the public came to the stricken man’s aid.

He was rushed to hospital with a host of serious injuries including gunshot wounds.