A STUDENT who beat up a friend who offered him a bed after he had burgled a hostel for the homeless asked magistrates to sent him to prison yesterday - and got his wish.

When Martin Alan Long-staff, 22, pleaded guilty to assaulting Paul Smith at his home in Mount Parade, Harrogate, and breaking into the warden's office at the town's homeless centre in Robert Street, his solicitor, Andrew Tinning, said he wanted to wipe the slate clean.

Longstaff, who sometimes lived for short periods with his mother in Prospect Place, Harrogate, and who had a conviction for stealing from her, had spent most of the last year in hostels in North and West Yorkshire.

Mr Tinning said for the last three months Longstaff had been studying sports science at Harrogate College in an effort to sort out his life.

Longstaff had been staying with his sister at the Harrogate hostel, sleeping on her floor, when he had taken the keys to the office from where he got cash.

Peter Scott, prosecuting, said Longstaff was arrested at the weekend for the attack and had confessed the February burglary to the police.

He had been out drinking with Mr Smith after staying at his flat for a few weeks and when they returned had launched a five-minute attack, following Mr Smith from room to room and punching his head and face.

When asked by the police what had happened, Long-staff said: "He was getting in my face and I gave him a bit of a hiding."

Sending Longstaff to prison for a total of six months, court chairman Jane Garlick told him he had carried out a persistent and nasty attack on a man who was in his own home and who could not get away.