A terrified man armed himself with a hammer after his flat door was kicked in by two intruders, a court was told.
However, the binge-drinking intruders then sat on the settee and offered the frightened man a can of lager and a cigarette, York Crown Court heard.
The occupant of the flat in Westbourne, was disturbed by the front communal door being kicked during the early hours of January 16, this year.
Then, as his own front door was attacked, the resident, a former robbery victim, armed himself with the hammer, finding himself face-to-face with two intruders, one of them armed with a multi-tool.
But then, the intruders realised they had the wrong flat, and calmed down, offering the lager, before leaving with a mobile phone.
Before the court for sentencing on a jointly previously admitted charge of burglary were Ryan Keogh, 20 of Lands Cliff, and Jonathan Stevens, 23, of Lismore Road.
Stevens, who has 13 previous court appearances for 23 offences, was already subject to a community order when he entered the flat.
His co-accused, with three convictions for six offences, was said by John Bumphrey, mitigating, to have played the lesser role, taking no part in what happened in the flat.
For Stevens, Trisha Doherty told the court that the “strange” burglary came about after both defendants had been binge-drinking and her client went looking for a friend.
They got the wrong flat, Mrs Doherty telling the court that her client only produced the bladed multi-tool after finding the occupant with the hammer.
“It was a case of you put that down and I will put this down” said Mrs Doherty.
Passing sentence, The Recorder of York, Judge Stephen Ashurst, said that normally burglars would expect an immediate custodial sentence, but he was satisfied this case was different, the drunken defendants intending no harm and taking the mobile phone as an afterthought as they left.
The judge sentenced Stevens to 18 months imprisonment, suspended for two years, Keogh to 12 months in a Young Offenders Institute, suspended for two years.
Both were also ordered to complete 200 hours of unpaid work, to undergo 12 months supervision and take part in an anti-binge-drinking programme.
A further 50 hours of unpaid work was also ordered against Stevens for his breach of the previous community order - for handling stolen goods.