A homeless man put up in a hotel by a charity returned to the room after checking out and stole the new occupant's cash, a court has heard.

Andrew Coleman also made himself a complimentary coffee, combed his hair with his victim's comb, and then left a used heroin needle in the new guest's toiletries bag.

Swansea Crown Court heard Coleman has previous convictions for almost 270 offences and that decades of drug abuse had left him "at death's door".

Tom Scapens, prosecuting, said in August this year Coleman trashed the kitchenette in his room at the city's Dinas Fechan hostel and damaged the door of a neighbouring room.

He was subsequently evicted from the premises and approached another homelessness charity seeking help. The court heard the organisation had no available accommodation so as an emergency measure Coleman was put up in the Travelodge hotel in Princess Way.

Mr Scapens said the 43-year-old spent the night of August 21 in room 407 in the city centre hotel but when he left the following morning did not return his key.

The room was subsequently cleaned and prepared for the next guest – a man who was staying in Swansea for work.

The court heard the new occupant checked in but was told there was a "problem with the key card" and had to be let into the room by staff. The visitor unpacked his bag then met up with colleagues.

Mr Scapens said when the guest returned to his room that evening he found items had been moved around, £250 was missing from his wallet, the complimentary tea and coffee facilities had been used, there was a clump of someone's hair attached to his comb, and there was a used drug-injecting needle in his wash bag. The prosecutor said fortunately the visitor had not come into contact with the syringe.

CCTV was checked and Coleman was identified as the burglar having used the retained key card to gain entry to the room.

Coleman, of no fixed abode, pleaded guilty to criminal damage, burglary, and shoplifting – the unrelated theft of £15 of deodorant, food and chocolate from a Poundland store.

Check what crimes have been reported in your area:

The court heard he has 85 previous convictions for 269 offences including attempted robbery, two house burglaries, 13 non-dwelling burglaries, and 151 for theft and kindred matters.

Stuart John, for Coleman, said the defendant grew up in care and had been an addict throughout his adolescent and adult life and his mental and physical health had suffered accordingly.

He said prior to be being remanded into custody pending sentencing for these matters his client had felt himself to be "at death's door" and uncertain if he would survive the coming months. The advocate said Coleman "welcomes" a custodial sentence as the alternative he faced would be "far, far worse".

Court stories you might have missed

Judge Paul Thomas QC said he was sympathetic to the problems in the defendant's life and to his health situation but said he had no doubt the defendant had kept the room key with the intention of returning to commit burglary. He said one the disturbing aspects of the case was the discarded drug needle left the the victim's wash bag.

Giving the defendant a one-third discount for his guilty pleas the judge sentenced him to a total of 14 months in prison. Coleman will serve up to half of that period in custody before being released on licence to serve the remainder in the community.