A man was attacked after two men burst into his bedroom in the middle of the night.

Leeds Crown Court heard the victim Jason Townley was asleep with his girlfriend around 4.15 am on July 27 when he heard someone knocking on the door to the house in Halifax Old Road, Birkby.

He assumed it was for another resident in the bedsits but minutes later his door burst open and two men entered.

He recognised Neil Jason Wood who was now in a relationship with his ex-girlfriend but did not know the other man Daniel Dixon, Richard Walters prosecuting told the court yesterday.

Dixon, 25 of Club Houses, Armitage Bridge, and Wood, 23 of Trafalgar Close, Brackenhall, were each jailed for two years after admitting assault and having an offensive weapon.

The two intruders had been drinking the previous night when her former relationship with Mr Townley was discussed and Wood had got it into his head she had not been treated well by him and had spoken of beating him up but was told not to.

However, earlier that night they had been drinking at a barbecue and decided to go the bedsits where Mr Townley lived after all. Wood told him it was in response for what he had done in the past.

Mr Walters said Mr Townley thought Dixon was carrying a cosh when he burst in, but that turned out to be a police type asp baton. He was terrified and fled the room in his boxer shorts seeking refuge at another room upstairs occupied by a 60-year-old man.

But both men followed after him. Wood swung punches at him but missed and Dixon hit him on the head with the weapon causing a cut. Mr Townley picked up some bolt croppers to try and protect himself but was then hit again with the asp on the shoulder.

By then his girlfriend had gone to another resident’s room for help and that man intervened telling the attackers to leave while the police were called.

He then helped the bleeding Mr Townley and the resident of the room who was sitting up shaking in his bed. The cut to Mr Townley’s head had to be glued.

The attackers were arrested at an address in Clough Road where the asp was found hidden in a freezer. The pair told police they had met in jail during previous sentences and both were on licence at the time.

Michael Sisson-Pell for Wood said he was in drink when they went to the house and had not intended serious harm. He realised he had behaved stupidly.

Zara Begum for Dixon said he had acted out of “misguided loyalty.”