A drunken thug charged at a police officer with a knife outside a house in New Stevenston.
Stephen Cashill confronted PC Liam Bryson who had responded to reports of a disturbance.
The brave officer stood his ground and hit the attacker on the head with his baton.
The incident in George Street came only four days after two officers were seriously injured by a man with a meat cleaver in Wishaw.
Cashill, 24, appeared from custody at Hamilton Sheriff Court.
He admitted assaulting PC Bryson and acting in a threatening or abusive manner on June 18 last year.
Mairi-Clare McMillan, prosecuting, said the attack happened outside the home of Cashill's mum shortly before 9pm.
She told the court: "The accused had asked his mother for her bank card and she refused.
"He became aggressive and was shouting and swearing.
"The police were called and as they approached the front door Cashill came out holding a knife.
"He shouted 'What the f... are you doing here?' and was asked to put down the knife.
"He then charged towards PC Bryson with the knife raised above his head."
In a statement read out in court, the officer said: "I realised I could be struck as he aimed the knife at me.
"I raised my baton and made contact with his head, causing the knife to fall from his hand."
Cashill was arrested and taken to hospital for treatment to a head wound.
Defence Diarmid Bruce said his client had been drinking and couldn't remember much about the incident.
Sentence was deferred until next month and Cashill was remanded in custody.