A man imported thousands of tablets of a banned drug to help him sleep at night, a court heard.
Usman Ali, 27, ordered more than 4,000 diazepam tablets after spotting them for sale online.
The package was intercepted by police when it arrived in the UK from Pakistan.
Ali, of West View in Batley, pleaded guilty to importing a controlled drug of class C.
He also admitted possessing the drug with intent to supply it after passing it on to some family members.
James Weekes, prosecuting, said that Ali came to the attention of police on October 29.
He said that a large cardboard box addressed to him was intercepted when it arrived into Coventry Airport.
The parcel was seized by officers when it was revealed that it contained 4,553 diazepam tablets.
Police arrested Ali from his home where a number of white envelopes with the drug inside were also found.
Two of these were addressed to persons.
Mr Weekes said: “He said he was using various drug hormones and since he had been taking these he had problems with sleeping.
“He thought that diazepam or Valium would help him relax and send him to sleep.
“The defendant said he found an advert on a Facebook page to purchase them.”
“He paid £250 for some 4,000 tablets (and) was under the impression that the drugs were coming from outside the jurisdiction.”
Ali also claimed he was unaware that the drugs were illegal and that he only sent them on to members of his family and friends.
Magistrates committed Ali to Leeds Crown Court for sentence.
He will appear there on May 22 and was granted unconditional bail.
Want to read, watch and hear more? You can download the FREE Examiner Apple App here , the FREE Examiner Android App here or you can view the paper as an e-edition on your Apple, Android or Kindle device by clicking here
To follow us on Twitter click here