A house burglar has six months to save himself from a jail term for two night raids, thanks to a long-serving pub landlord.

Gordon Watkins, 57, "put his head on the block" on behalf of his employee Jason Peter Gaskell, the Recorder of York, Judge Stephen Ashurst, told York Crown Court.

The landlord of the Ebor Inn in Bishopthorpe sent a character reference to the judge and attended court to support Gaskell, 20, when he appeared on charges of burgling two houses in Acomb in a single night and trying to get into a car on one of their drives.

Gaskell's solicitor advocate Julian Tanikal said Mr Watkins had "taken Gaskell under his wing" and given him a job and responsibilities, including looking aft er the pub when he was ill.

David Bradshaw, prosecuting, said one of the raided houses was Gaskell's neighbours at the time and he was scared off the other when he activated a car alarm and woke a nearby resident. He appeared to be in drink. He has previous convictions for criminal damage, a public order offence and drug possession, and has spent time behind bars but has no previous convictions for burglary.

The judge told Gaskell: "I am being asked to say what you did in November was completely out of character. I am not completely convinced you have sorted out your problems."

He deferred sentence for six months and warned the burglar that any offence during that time would lead to him being jailed. But if he stayed out of trouble, he would not be locked up.

"Mr Watkins has put his head on the block somewhat to help you," he said. "You have been exceptionally fortunate today. Don't let me down."

Gaskell, now of Main Street, Bishopthorpe, pleaded guilty to two burglaries and one charge of interfering with a car.

Mr Tanikal said Gaskell had been drinking with customers at the pub on November 28 and after shutting up the pub, carried on drinking.

He couldn't remember what happened then until he woke up with a phone stolen in one of the burglaries under his pillow. Then the police arrived and told him.

"He has no explanation as to why he did it," said Mr Tanikal. Gaskell returns to court on June 23 to learn his fate.