A young doctor who was caught by a police sniffer dog with ecstasy in his pocket has escaped with a warning from his professional body.

Dr Jacob Bayley was exhausted mentally and physically' after a week working night shifts in the run-up to Christmas at Bradford Royal Infirmary, the General Medical Council heard.

He bought the drug in a London nightclub on the first night of his two-week Christmas holiday after he travelled to the capital to see friends.

But Dr Bayley was caught the next evening with the ecstasy in his pocket, when a police sniffer dog reacted as he walked through Liverpool Street station and he was immediately searched.

Dr Bayley was given a police caution for possessing a class A drug.

His bosses at Bradford Hospitals NHS Foundation Trust investigated the incident but decided to take no action. The General Medical Council ruled Dr Bayley's fitness to practice was not impaired, but decided to warn him.

Panel chairman Dr Kevin Walters told the hearing Dr Bayley had made one mistake for which he was sorry, and testimonials showed he was otherwise "a hard-working, honest and caring doctor".

Dr Walters said: "The panel takes a serious view of your conduct in the possession of a Class A drug because such behaviour is capable of undermining public confidence in the medical profession.

"However, the panel is satisfied that your behaviour would not have caused patient harm, and you have insight into the circumstances and effect of the incident."

Dr Bayley qualified at Leeds University in July, 2005, just six months before the ecstasy incident, and began work at the Bradford hospital almost immediately.

In the week running up to Christmas he had been working night shifts on a busy acute surgical ward, and in a letter to the GMC claimed he was "both exhausted physically and mentally".

He began his two weeks' leave on December 15, and that night travelled down to London and bought the drugs. The following evening at about 7.30pm, a police sniffer dog reacted as he walked through Liverpool Street station.

Dr Bayley co-operated fully with police and on March 4, 2006 he received an official police caution.

He informed his hospital bosses and the GMC, as is his obligation.

Dr Bayley will now have a warning on his record, which will last five years, and all employers will be informed. He is otherwise free to practise as a doctor.

A spokesman for Bradford Teaching Hospitals NHS Foundation Trust, of which Miles Scott is chief executive, said it had been unaware of Dr Bayley's police caution until after he had left its employ.

The spokesman said: "The Trust takes the welfare of its patients, visitors and staff very seriously.

"We have robust procedures in place to support staff that have issues with alcohol or drugs and would suspend any member of staff found to be in possession of illegal drugs at work.

"In Dr Bayley's case we had no evidence of any drug use or any police caution until after he had left our employment.

"The General Medical Council then asked us to provide a record of his time with us.

"We found that Dr Bayley had a good work record and had no reason to believe that any patients had ever been put at risk during the short period he worked for us."