A father-of-five who launched a motiveless knife attack on an unsuspecting neighbour has escaped a prison sentence.

Judge Robert Taylor decided yesterday to make 41-year-old Shahid Ali the subject of a three-year community rehabilitation order after a report indicated he was suffering from a mental illness at the time of the incident.

In March Ali visited the home of Moinul Islam in Binnie Street, Bradford Moor, and after a brief exchange on the doorstep he ran at his neighbour with a knife in his raised right hand.

Prosecutor John Sleightholme said fortunately Mr Islam was able to block the blow, but he suffered a cut to his upper left arm.

Ali came into the house, where children were present, and then tried to attack Mr Islam's brother, but he was able to kick him away.

One witness described Ali as being in a rage and his eyes appearing red. Ali eventually handed himself in to police, but Mr Sleightholme said his behaviour during interview was strange and he was admitted to hospital.

After the attack Ali, also of Binnie Street, was charged with wounding with intent to do grievous bodily harm, but his guilty plea to a less serious charge of unlawful wounding was accepted by the prosecution.

Bradford Crown Court heard that Ali was a man of no previous convictions and glowing references were handed in.

His barrister Neil Clark said Ali was a man of impeccable character and it was clear from a medical report that at the time he was suffering from an acute, though transient, psychotic disorder.

Judge Taylor said it was a completely motiveless attack but the medical evidence indicated he was suffering from short-lived mental illness at the time and for that reason he could avoid prison.