A judge has given a suspended prison sentence to a 33-year-old man who attacked an alleged rapist in his home.

Bradford Crown Court heard today how the attack took place at a flat in the Allerton area after the victim was granted bail pending further inquiries into the rape claim.

Prosecutor Sophie Drake said the defendant - who cannot be named because his sister is the complainant in the rape matter - went to the suspect's flat last December.

Miss Drake said the man was asleep and woke to find the brother in his bedroom. The man was punched and kicked in the face and even had a television thrown at him.

At one point, his attacker wrapped an adapter round his arm and used it to strike the man on his face and back. "There is clearly a plug mark injury on his back," noted Miss Drake.

The man eventually fled from his home, having received injuries to his face, back and head. The defendant told police he had gone round after hearing that the man had been accused of raping his sister.

Last month he admitted a charge of assault occasioning actual bodily.

Judge Jonathan Durham Hall QC said the court faced a dilemma between an understanding for the defendant's position and the fact that the courts consistently felt driven to indicate that citizens should not take the law into their own hands.

The defendant's lawyer, Anne-Marie Hutton, said he had not gone to the flat with the intention of assaulting the alleged rapist, but had wanted to put a face to the name.

"He accepts that, very shortly after, his temper quite clearly got the better of him and he could not control his emotions," she conceded.

Miss Hutton submitted that her client's behaviour was out of character and he had learned his lesson.

Judge Durham Hall said it was rare and exceptional for a court not to pass an immediate prison sentence in such cases, but he said he was satisfied that for many years the defendant had been a law-abiding and hard-working man.

"You clearly, on that particular day in question, were confronted by an appalling dilemma," said the judge.

"Your sister making an allegation, which the police were acting upon, of being raped by another man and you went to visit that man, no doubt with the distress and pain of your sister etched in your mind, and once in the presence of that man you lost your self control and abused and assaulted him."

Judge Durham Hall said other judges would send the defendant to jail for between 12 to 15 months, but added: "For reasons that are instinctive than logical, that are more based on human understanding than rationality, I'm going to give you a chance."

He sentenced the defendant to 12 months in jail suspended for two years. He will also have to do 150 hours' unpaid work for the community, be subject to a night-time curfew for the next three months and have to pay £300 costs.