A drug dealer who had enough ingredients to make more than £2m of ecstasy has been jailed.

Connor Smith,25, was caught by detectives after an investigation aimed at finding out who was supplying dealers throughout central Scotland.

The High Court in Edinburgh heard how officers established the man they were looking for was Smith during an intelligence-led initiative called Operation Thuban.

Police raided a property in Clackmannanshire and found a pill press, ecstasy in powder form and 65 kilos of a bulking agent.

Cops established that the bulking agent had the potential to make 234,000 tablets with a street value of £2.34m.

On Wednesday Smith, a prisoner of HMP Barlinnie, pleaded guilty to being involved in the supply of ecstasy between July 2017 and October 2018.

The offences took places at addresses in Alloa.

Prosecution lawyer Liam Ewing told the court that officers raided a house in Clacks on December 28, 2017 and detained an individual, who wasn't named in court.

They found a pill press and MDMA powder that if was made into tablet form would have a street value of £60,000.

Mr Ewing said: "It was not possible on the information available to assess how many tablets had been produced by the press but it is estimated that the potential annual output from the press could potentially realised a figure between £390,000 and £1,300,000.

Mr Ewing told the court the person who was detained by police identified Smith as being the man who owned the pill press.

Forensic officers also recovered his fingerprints from the press and the bag of bulking agent.

Meanwhile on May 3, 2018, the court heard how police pulled over a black Renault Megane on the A92 outside Kirkcaldy in Fife.

The man who was driving the vehicle, Ian Hildersley, had 11,000 ecstasy tablets and a kilo of MDMA in crystalline form.

The court heard the estimated street value of the drugs were more than £100,000 and that police also found Smith's fingerprints on the bags containing the drugs.

On August 24, 2018, police caught Smith with 2,000 ecstasy tablets when a car he was travelling in was stopped in Admiralty Road, Rosyth.

It was then established that Smith had purchased the pill press from a firm called LFA Machines and spent a total of £4,509.99 with the firm and a further £600 buying stamps for the pills.

The stamps had the logos for designer clothes firm Stone Island and Nike's Air Max brand.

Mr Ewing added: "Operation Thuban was an intelligence led operation into the sale and supply of controlled drugs in the Clackmannanshire and wider Forth Valley areas by an organised crime group.

"During the course of the operation there were a number of recoveries by police from other individuals which the police then linked to the accused as a supplier.

"The police inquiries established that the accused was concerned in the manufacture and distribution of ecstasy tablets.

"The accused was interviewed under caution and initially answered no comment to all questions.

"However, he thereafter admitted that he had purchased the pill press recovered from the Clackmannanshire address and he had been producing ecstasy tablets using it."

Judge Lord Pentland deferred sentence for the court to obtain reports on Smith's character and remanded him in custody.

He will be sentenced next month.