A heroin dealer was twice "caught red-handed" selling drugs in his high-rise flat.

James Buchanan, 37, of Irvine, North Ayrshire, has a long history of drug trafficking, the High Court in Stirling heard.

Police used a battering ram in a raid on his flat in the high-rise block in Afton Court on December 2, 2014, and found heroin with a street value of nearly £4300. They also recovered electronic scales and plastic bags.

In a second raid on September 2, 2015, a further £300 worth of heroin was found, even though Buchanan tried to get rid of some of the drugs by throwing them out of his tenth-floor window.

Buchanan pleaded guilty to being concerned in the supply of the class A drug, and obstructing police.

Defence advocate Derrick Nelson said Buchanan, who has 35 previous convictions, had been in prison annually since the age of 17, initially for housebreaking and car offences but also for drugs offences dating back to 2005.

Mr Nelson said: "He has to accept he was involved in trafficking of drugs at some level, though it was not at a high level."

Jailing Buchanan for seven and a half years, judge Lord Turnbull told him: "For practical purposes, you were caught red-handed in your own property."

Download: The STV News app is Scotland's favourite and is available for iPhone from the App store and for Android from Google Play. Download it today and continue to enjoy STV News wherever you are.