A man who tried to murder a police officer in a knife attack has been jailed for 10 years.
Graeme Davidson, 37, attacked Pc Derek Laing at a property in Lundin Crescent, Tayport, Fife, on June 29.
The officer said he was left in a "fight for my life" as Mr Davidson stabbed him.
The High Court in Glasgow heard the blade was only stopped by the officer's breastbone, which prevented it from reaching his vital organs.
Mr Davidson pleaded guilty to attempted murder when he appeared at the High Court in Glasgow last month.
He was given an extended sentence comprising 10 years and three months in prison and three years on licence when he returned to court on Friday.
Sentencing him, Lord Matthews said: "On October 24 you pleaded guilty to an extremely serious offence. Attempted murder is a serious enough crime in its own right but when the victim is a police officer carrying out his duties it is aggravated to a significant degree.
"The community relies heavily on police officers who often put their lives at risk to protect us. The courts have in turn to protect them."
'Fight for my life'
At the earlier hearing, the court was told Mr Davidson had been visiting his cousin the previous night and started drinking around 8.30pm, before a neighbour phoned police a few hours later.
Officers arrived to find Mr Davidson alone and asleep in the bedroom and when he woke up, appearing intoxicated, he questioned why they were there.
Pc Laing tried to help Mr Davidson find his clothes before leaving him sitting dressed on the bed.
He stood in the property's hallway by the kitchen door and soon after Mr Davidson, who had not been placed in handcuffs or searched, left the bedroom in a hurry.
The officer thought Mr Davidson was rushing to the front door but quickly realised the accused was coming towards him "at speed", with his right hand raised and holding "a long, slender item".
Advocate Margaret Barron, prosecuting, said Pc Laing's initial thought was to hope it was a pen, before realising he was "in a fight for my life" as the knife "made an impact to his chest".
Reports from other officers described Mr Davidson as "lunging" and "jumping" at their colleague, who had no time to react or reach for his protection.
A picture of the weapon, measuring 3.5in in length, was shown to Lord Matthews.
The judge was told the knife left a "1cm puncture wound" that was "superficial... but could have been more significant".
Pc Laing was treated by his colleagues before being taken to Ninewells Hospital in Dundee, where he needed two stitches.
The court also heard that since the incident, the officer has been "struggling to cope with the effects on his wife and young family" and has sought help.
Iain Paterson, defending Mr Davidson, said his client accepts "full responsibility" for what happened.
He said: "Police had not gone to arrest Mr Davidson. He was not committing any crime, he was asleep and unfortunately intoxicated and having been woken up he did what he did. He accepts full responsibility for that."