A man who burgled a hotel room while on police bail after being caught with 130 ecstasy tablets has been jailed for two years and three months.

David Langsbury, 21, admitted possessing class A drugs, possessing cannabis and burglary at Oxford Crown Court.

Howard Wilson, prosecuting, said he was arrested after police were called to a robbery in Iffley Road, Oxford, on Boxing Day 2002. Officers saw Langsbury, of no fixed address, with another man, David Kelly.

Mr Wilson said when Langsbury spotted the police car, he ran away. He was caught and -- although he was not connected with the robbery -- officers discovered 130 ecstasy tablets, worth between £730 and £1,400, and cannabis in his pockets.

Langsbury told officers he was David Kelly and gave them Kelly's address in Rose Hill, Oxford. When they arrived there, they discovered Kelly hiding 250 ecstasy tablets and 22oz of cannabis.

Kelly was jailed at Oxford Crown Court last year for two and a half years for possessing class A drugs with intent to supply.

Langsbury told police he was looking after the drugs for Kelly in return for a discount on 20 ecstasy tablets bought for his own use. He was released on police bail.

On July 22 last year while still on bail, Langsbury stole CDs and keys from the Travel Inn hotel, in Garsington. He was arrested last October. Langsbury said he carried out the burglary to feed a heroin addiction.

He said he had overcome his addiction while on remand and planned to start a new life after his release.