A judge has blamed widespread police failures for the vigilante murder of a disabled man – as he jailed two officers for misconduct over their failure to prevent the attack.

Judge Neil Ford QC criticised the actions of the two officers but said they could not be blamed for the wider policing problems that contributed to the murder of the Iranian refugee – who was wrongly suspected of being a paedophile by his neighbours.

Bijan Ebrahimi, 44, had called police to report a mob outside his Bristol home, but was arrested himself for a breach of the peace. After being detained overnight, he made another dozen calls to police but his cries for help were ignored before he was murdered by a neighbour.

PC Kevin Duffy, 52, was jailed for 10 months and community support officer Andrew Passmore, 56, for four months for what the judge described as a “serious departure” from the standards that the public expected of the police service. The two men were sacked from Avon and Somerset Police last month, but 15 other officers and staff are awaiting disciplinary hearings over the case.

“It is with a heavy heart that in each of your cases I take the view that only a custodial sentence is appropriate,” Judge Ford told the two men. “It doesn’t seem to me a proper consequence of your wrongdoing that the sentences need be long. You have already suffered greatly. You have already lost your careers and in each of your cases there is genuine justification for mercy.

“You must not bear the responsibilities for the wider failings in the police which were beyond your control.”

Mr Ebrahimi was kicked and beaten to death by his neighbour Lee James, who had been described as frothing at the mouth when police first responded to the victim’s 999 call. Officers led Mr Ebrahimi away in handcuffs in front of a jeering crowd.

Following his release, Mr Ebrahimi tried to contact Duffy but the officer ignored the calls despite being warned by another officer of “vigilante issues” at the Bristol estate.

Duffy eventually sent Passmore to the estate. He lied to investigators about patrolling the area for an hour, when he could have been only there for a couple of minutes.The last phone call from Mr Ebrahimi was made about an hour before James killed him by stamping repeatedly on his head and setting the body alight with the help of a neighbour. James had claimed that Mr Ebrahimi had been taking photos of his children for his own sexual gratification.

It emerged that Mr Ebrahimi had been taking pictures as evidence of the harassment as he sought a move from his council home. James – who told his partner that he had done it for his children – was jailed for life in 2013.

The inquiry into police failings took considerably longer with most of the disciplinary hearings still to take place.