A man tried to hide hundreds of pounds of Class A drugs in his underwear, Skipton magistrates were told.

Acting on information, the officers approached Keighley man Robert Steele as he got out of a taxi in Greatwood Avenue, Skipton, on September 27. Steele, 31, put his hands down his trousers apparently hiding something, the court heard on Friday.

He was arrested and taken to the police station where a search revealed a bag in his clothing.

Inside were 21 bags of cocaine, with a street value of between £60 to £800, and 24 bags of heroin, valued at between £277 and £305. Police also discovered messages on Steele’s mobile phone using a variety of drugs slang.

In interviews with police, he said he had gone to Skipton to return cocaine which he believed was not real. Steele, who admitted two counts of possessing a class A drug, had been taking heroin since he was 17, had a long record of offending and had served custodial sentences for drugs-related offences.

In mitigation, John Kelly said Steele had not taken heroin for five weeks and was keen to stay clean so he could maintain contact with his son who lived with his parents.

Magistrates told Steele, of Neville Street, that he had been very close to being sent to prison and further offending would lead to custody.

He was given a nine-month community order with supervision and six-month medium level drug rehabilitation requirement, including twice weekly drug testing and eight hours per week session work. He will also have to pay £85 costs. The drugs will be destroyed.