A failed Iranian asylum seeker has escaped a prison sentence by being sent to a mental health hospital after killing a British grandmother at her home last year, despite the fact he should have been deported in 2015.

This week, Shahin Darvish-Narenjbon, 34, pleaded guilty at the Leeds Crown Court for killing 87-year-old Brenda Blainey of the Thornton-le-Dale village in North Yorkshire last year. The court heard that he had strangled her, then went on to pound her head into the kitchen floor, before ultimately slitting her throat.

Darvish-Narenjbon, a native of Tehran, befriended the elderly woman after travelling to the UK to study in 2015, allegedly developing a “grandmother and grandson” style relationship that saw him offered a bedroom to live in her cottage, the Northern Echo newspaper reported.

While the Iranian national’s permission to stay in Britain ended in 2015 and an application for asylum status was also rejected, meaning that he should have been deported years before the gruesome killing occurred, the Home Office failed to remove Darvish-Narenjbon from the country.

He was initially charged with murder, however, prosecutors accepted a lesser guilty plea of manslaughter, given the Iranian migrant’s supposed long history of mental illness such as paranoid schizophrenia. Therefore, instead of being sent to prison, the killer will be sent to a mental health hospital.

Announcing the sentence on Wednesday, Judge Rodney Jameson KC told the defendant: “I want to make it clear both to you and to the family of Brenda Blainey that this is not to say that your responsibility is extinguished; it is not.

“You remain, albeit to a low degree, responsible for the dreadful death of Mrs Blainey and for the grief and suffering that this has caused to her friends and family.”

The judge went on to say that the Iranian national continues to pose a “risk to members of the public of serious harm” and when in a psychotic state is capable of “homicidal violence”.

Yet, the judge said that “given the situation in Iran, however, you will not presently be considered for deportation.”

A Home Office spokesman refused to give a comment on the specific case, however, said more broadly: “Foreign National Offenders who exploit our system and commit crimes here in the UK will face the full force of the law, including deportation at the earliest opportunity for those eligible.

“The government is committed to stopping abuse of the immigration system, taking decisive action against those who try to play the system.”

Follow Kurt Zindulka on Twitter here @KurtZindulka