A man has admitted attempting to murder a police officer after stabbing him as he responded to a call about a disturbance in Fife.
Graeme Davidson, 37, attacked PC Derek Laing at a property in Lundin Crescent, Tayport, on 29 June.
Davidson, who was drunk, charged at the 46-year-old officer before stabbing him in the chest.
He admitted the offence following a hearing at the High Court in Glasgow. Sentence was deferred.
The court was told that Davidson was found sleeping in a bedroom at the property and became violent after questioning why officers were there.
He had been drinking since 20:30 the previous night before a neighbour phoned police a few hours later.
But PC Laing, of St Andrews police office, had "no cause for concern" as he tried to help Davidson find his clothes before leaving him sitting dressed on the bed.
The accused, who was staying with his cousin, was not put in handcuffs or searched.
A short time later the officer was standing in the hallway when he 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 Mr Laing's initial thought was hoping it was a pen before thinking he was "in a fight for my life" as the knife "made an impact to his chest".
Reports from other officers described Davidson as "lunging" and "jumping" at their colleague, who had no time to react or reach for his protection.
A picture of the weapon, which measured 3.5in, was shown to Lord Matthews.
He was also told it left a "one centimetre puncture wound" that was "superficial ... but could have been more significant".
'Struggling to cope'
Mr Laing was treated by his colleagues before being taken to Ninewells Hospital in Dundee and was later discharged with two stitches.
The court also heard as well as being "greatly concerned for his life", the police officer has been "struggling to cope with the effects on his wife and young family" since the incident and had sought help.
Chris Fyffe, defending Davidson, told the court the accused "suffered from mixed anxiety" and had been drinking "as a coping mechanism" the night of the incident.
Davidson's not guilty pleas to assault, assault to danger of life, threatening or abusive behaviour and assaulting an officer in execution of their duty were accepted by the Crown.
Lord Matthews adjourned the case until next month for a criminal social justice work report.