A drug debt enforcer who stabbed a 40-year-old victim twice on the doorstep of his Norwich flat has been given an 18-year extended sentence after a judge said he posed a danger to the public.

Ashley Anderson tried to force his way into the flat during a frantic struggle on November 21, before the victim managed to end the assault by closing the door.

Anderson, 26, from London, was arrested the next day and was due to go on trial for attempted murder.

However, despite threats made to the victim which caused a delay to the start of the trial, Anderson pleaded guilty to inflicting grievous bodily harm with intent.

Andrew Jackson, prosecuting, explained there was a drugs background to the case which had the hallmarks of an enforcement of a drugs debt.

He said that the victim was a drug addict and when there was a knock at the door he thought it was a friend.

He said when he opened the door it was in fact Anderson armed with a large knife and was stabbed before he managed to end the attack by closing the door.

He said: "Anderson succeeded in inflicting two serious stab wounds, the most serious was in his chest."

He said the wound punctured the victim's lung and he suffered a loss of blood which required a blood transfusion.

Mr Jackson said: "The surgeon described the wound as potentially fatal."

He said there was no evidence that Anderson played any part in any threats made to the victim but said in a statement the victim said the incident had left him feeling unsafe to come out of his home and he had been extremely worried about his family.

The court heard that Anderson had a number of serious previous convictions including GBH with intent in 2010, possession of an imitation firearm and he had been sentenced to eight years for robbery and burglary in April 2012.

Judge Stephen Holt said that Anderson, who appeared over a video link from Norwich prison, posed a significant risk to the public and imposed an 18-year extended sentence made up of 13 years in custody and five years extended licence.

He said the report showed that Anderson showed no fear of authority and said he had gone to the scene of the attack armed with a knife.

Although he had not issued any threats to the witness, he said he was sure that the fact the witness finally turned up at court played some part in him pleading guilty.

"There is no doubt this had a traumatic effect on the victim and his family and his mother, who witnessed this attack on her son."

Christopher Stimpson, for Anderson, said that the previous serious offending was when he was a teenager, and said that he deserved credit for the guilty plea.