“The accused returned with a knife in his hand and pointed it towards his own face”, added Mr Crosbie. “He then lunged towards Mr Doolan with the knife and his father fled from the flat.”

Mrs Doolan was then locked in her own home and ordered her to sit on a couch. The woman was said to be “clearly upset at this” request.

Mr Doolan then alerted the police to the ongoing incident and when officers arrived they could see Mrs Doolan shouting from a window claiming her son “had a knife”.

Officers managed to gain entry to the flat where they failed to spot the knife, but during the subsequent struggle Doolan head-butted one constable to the face.

Defence solicitor Andrew Mellor told the court his client suffered from “mental health difficulties” and had been prescribed medication for depression.

Sheriff Frank Crowe deferred sentence for the preparation of reports and ordered Doolan to return to court for sentencing on July 7.

Doolan pleaded guilty to behaving in a threatening or abusive manner by shouting, swearing, throwing bedding about the flat, brandish a knife, prevent his mother Annette from leaving the property by locking the door and forcing her to sit on a couch during the incident at Artillery Park, Haddington, on June 26 last year.

He also admitted lunging at his father with a knife and to assaulting PC Peter Bamford by head-butting him to the face during the same incident.