A drug trafficker who was released early from prison was caught dealing in ecstasy and cannabis, a court heard.
The court heard Hall was seen trying to throw away Ecstasy tablets
A police raid on Damian Hall's home in Inverness recovered more than 3,400 tablets of ecstasy with a potential street value of up to £17,000.
He admitted being concerned in the supply of drugs on 29 April this year, at the High Court in Edinburgh.
Judge Lord Carloway deferred sentence on him for the preparation of a background report.
Advocate depute Graeme Jessop said Hall, 29, had previous convictions for drugs offences and had latterly received a 27-month jail sentence.
He was released in September last year, although the sentence was not due to expire until October this year.
Mr Jessop said: "During April police received intelligence that he was involved in the supply of ecstasy in the Inverness area."
They obtained a warrant for the council flat where Hall lived with his partner, who was the tenant.
Officers forced entry to the property and found him in a bedroom, where he was standing by the window with his arms raised as if trying to throw tablets out.
They shouted "Stop, police" but tablets went flying.
A police search found one bag containing more than 1,000 tablets, with other split bags containing a further 470 and 350.
A further 500 tablets were scattered on the floor and officers also discovered more than 9g of powder also containing ecstasy.
Under a mattress they found £6,265 and when Hall was searched he was discovered to have more £1,000 in cash on him.
Drug squad officers said that if the ecstasy was bought in bulk the tablets could be acquired for about 30p each.
But each tablet could be sold on for £2 to £5.
A search of the flat also revealed a blue bag in the bedroom containing more than 700g of cannabis, which was estimated to be worth £3,000 on the streets.
Detectives said that the amount of both drugs recovered in the raid were dealer quantities, said Mr Jessop.
He said the Crown would be seeking forfeiture of the money found under the mattress and on Hall.
Hall was also served with papers in the dock at the court to confiscate any profits of crime.