A man swung a pole at his neighbours in their communal garden while making references to Satan.
Martin Fortune, 47, then ran at Darren Ingram and Dylan Hume with a kitchen knife, a court was told.
Fortune was first spotted in the garden area behind a block of flats on Ballantrae Terrace where all three men live, at 4.15pm on July 31 last year, Dundee Sheriff Court heard.
Fiscal depute Isma Mukhtar said: “Mr Ingram and Mr Hume heard shouting from the communal back garden area and looked out from their veranda.
“They saw the accused standing in the garden holding a pole.
“He was swinging it about and making references to Satan.
“The two men thought his comments were directly at them — so they went down to the garden to remonstrate with the accused.”
Fortune shouted at the pair and then ran towards them, swinging the pole.
It hit a wooden clothes pole in front of them, which snapped in half.
The fiscal added: “The accused then pulled a kitchen knife from his waistband and ran towards both complainers.
“They returned to their flat when they saw the knife and contacted police.”
Officers arrived quickly and found Fortune lying on a trampoline in the garden with a duvet over him.
As they approached he pulled out the knife and waved it from side to side in a non-threatening way, the court heard, then put it underneath his pillow.
Police removed the knife, without any resistance from Fortune, who did not say anything as they did so, said the fiscal.
The officers noted that Fortune was under the influence of alcohol and appeared to be showing signs of mental disorder.
He was arrested and taken to police headquarters.
Fortune admitted assaulting Mr Ingram and Mr Hume by brandishing a pole and knife at them at Ballantrae Terrace.
Solicitor Ross Donnelly, defending, said: “He accepts he has difficulty with binge drinking.
“His intention was to engage with support.”
Fortune was placed on an 18-month supervision order, with added requirements that he take part in alcohol treatment and psychological treatment.