The court heard PC Wilson had visited the address the day before and discussed Smaile’s mental health problems during a welfare check.

She had been suffering from psychosis, was not taking prescribed medication and had consumed cannabis.

Defence lawyer Mark Shepherd said it was her mental health issues that had led her to act “irrationally and violently”.

Smaile admitted unlawfully and maliciously wounding an officer with intent to cause her grievous bodily harm, assaulting an officer, causing him actual bodily harm and two charges of threatening both officers with a knife.

Judge Nicholas Barker told Smaile: “The knife that was used against the two police officers… is a fearsome object and could easily have caused significantly worse injuries than it did.”

The judge concluded the two PCs should be formally commended for their bravery.

“Both officers have acted, in my judgement, in an impressive and dignified way,” he said.