Father-of-one Pc Jon Henry was called to respond to an incident in Luton
A cannabis user told police he was happy to have stabbed one of their colleagues to death, a court has heard.
Ikechukwu Tennyson Obih is accused of murdering Pc Jon Henry, 36, in Luton town centre on 11 June 2007.
Mr Obih, 29, of Winsdon Road in Luton, admits manslaughter on the grounds of diminished responsibility but has denied murder.
Luton Crown Court heard he also denies the attempted murder of two window cleaners on the same day.
The attempted murder charges relate to Steven Chamberlain and David Knight.
Mr Obih, who is known as Tennyson, also denies charges of aggravated burglary and assault, in a separate incident on the same day.
The court heard Pc Henry's death was part of a "series of violent incidents" that resulted in other people being injured.
Richard Latham QC, prosecuting, said that shortly after 0700 BST on 11 June, 55-year-old Mr Chamberlain arrived in George Street in his car.
When Mr Obih stood in the spot where he was intending to park, there was a row between the two men.
Mr Latham said the defendant delivered a heavy blow with his right fist to the car's passenger side window before opening the nearside door and trying to wrench it off its hinges.
A short time later, as Mr Chamberlain removed his window cleaning equipment from his vehicle, he felt a blow to his back and reached behind him to discover he was bleeding, Mr Latham added.
It was at that point the first 999 call was made to the police.
Mr Knight, who had been nearby and had armed himself with an extendable window cleaning pole, saw the defendant walking in the direction of the town hall and approached him.
Mr Obih had a "distorted perception of reality", prosecutors say
Mr Obih is said to have threatened to stab him if he kept following him and then pulled a knife from his pocket.
By this time police officers were making their way to the scene. Among them was Pc Henry, who was wearing a stab proof vest, but it had not been fastened to the top.
When officers told Mr Obih to put the knife down, Pc Henry moved behind him and took out his police baton.
"Suddenly he rushed and lunged at him, stabbing him in the upper chest area just above the vest with the knife he was carrying," said Mr Latham.
The court heard Pc Henry fell to the ground and Mr Obih stabbed him again in the chest area.
A large baton round fired by an armed response team failed to stop him and it was only when he was stunned for the second time by a taser gun that the officers were able to overpower him.
Mr Latham said that Mr Obih told officers he was "happy and felt good about what he had done but knew he had done wrong".
Earlier Mr Latham told the jury Mr Obih had arrived in the UK from Nigeria in 2000 and then started abusing alcohol and cannabis.
Mr Latham said family members had described "a significant deterioration in his mental state" between 2000 and 2003 and he was diagnosed with schizophrenia in 2005.
Mr Latham told the court it was the prosecution's belief that Mr Obih was not suffering an "acute phase" of schizophrenia on the morning Pc Henry was killed.
The trial continues.
Tennyson Obih denies murdering Pc Jon Henry