A stabbing victim had to have six blood transfusions at the Leeds General Infirmary after being knifed in the chest at a Calderdale park in the summer.
Builder's labourer Alec Miller had intervened when "dangerous" teenager Samuel Smith and another youth had started attacking his friend during a Saturday tea-time confrontation at Calder Holmes Park in Hebden Bridge.
Smith, who had been living at a hostel in Cleckheaton for a fortnight after being released from a previous custodial sentence, reacted by deliberately stabbing the 20-year-old in the chest with what was said to be a hunting-style knife.
Bradford Crown Court heard today that Mr Miller had to be taken by air ambulance to the LGI where he was taken into theatre.
Prosecutor Abigail Langford said the complainant suffered substantial internal bleeding due to a severed artery and had to have six blood transfusions.
She said Mr Miller also suffered a collapsed lung and a laceration to his liver.
Smith, who had previous convictions for offences including robbery and attempted wounding with intent, was arrested later that day from the Elm Bank hostel.
In his victim impact statement Mr Miller described how he was now very wary of going out and had suffered sleeplessness, chest pains and paranoia.
Although Smith refused to answers any questions following his arrest in June a month later he pleaded guilty to wounding Mr Miller with intent do him grievous bodily harm and possession of the knife, which was never recovered by police.
His case was adjourned until today for reports to be prepared and after hearing about the teenager's troubled past Judge Colin Burn sentenced him to nine years in a young offenders institution with an extended licence period of four years.
Barrister Mark McKone, for Smith, said his client wanted the court to know that realised what he had done was wrong.
He suggested that Smith's mental health at the time was bound to have been affected by his client's previous drug use from a young age.
Judge Burn said he had no difficulty in accepting that Mr Miller would suffer on-going psychological trauma for the rest of his life.
After hearing details of Smith's previous convictions the judge concluded that the teenager was dangerous and he said he would be failing in his public duty if he didn't deal with the case under the dangerous offender legislation.
The judge said the injuries to Mr Miller had been life-threatening and if it hadn't been for the six blood transfusions things would have turned out very badly indeed.
Keep up-to-date with all the latest news and breaking incidents in Halifax - join our dedicated Facebook group here.