Jamie Morrison stabbed PC Scott Kidd on the hand as the officer tried to defend himself when Morrison charged at him and two other officers with an eight-inch kitchen knife.
PC Kidd had tried to douse Morrison in CS spray in a bid to stop him and raised his hand to cover his head from the impending attack, Dundee Sheriff Court heard.
Morrison, 27, of Balmullo Place, Dundee, who had just told the officers he was "going to kill them", then "deliberately struck" the officer with the blade.
He had originally been charged with attempted murder last year but yesterday pleaded guilty instead to a charge of assault to injury.
Sentence was deferred for reports.