Louis De Zoysa, 25, was found guilty on Friday of murdering Sgt Matt Ratana with an antique revolver after he had been caught by police carrying ammunition and cannabis.
Police did not discover the gun when he was taken into custody, Northampton crown court heard, and Sgt Ratana was shot in the chest during the process of booking in De Zoysa.
Footage shown to jurors and released during the trial shows De Zoysa being spoken to by Sgt Ratana, who introduces himself and explains the possible charges he faces.
When the Sergeant tells De Zoysa he is about to be searched, the alleged gunman is seen standing up and contorting his body.
The footage show in the trial went on to show officers bundling De Zoysa to the ground in the cell.
De Zoysa was himself shot in the neck in the incident, while Sgt Ratana was rushed to hospital but died from the gunshot wound.
Imran Khan KC, defending, told the jury during the trial De Zoysa said he was suffering an autistic meltdown at the time of the shooting and “did not mean to or want to kill Sergeant Ratana, or to cause him really serious harm”.
Opening the case, prosecutor Duncan Penny KC described the footage: “Louis De Zoysa was holding the gun in his right hand. He fired the gun directly at the chest of Sergeant Ratana.”
A second shot, fired a second after the first shot, hit Sgt Ratana in the leg but was not the fatal wound, the court heard.
Moments after the fatal first round was fired, Mr Penny said, another police officer was continuing to pull De Zoysa backwards.
The Crown’s barrister added: “At the time, the gun was in Louis De Zoysa’s right hand. At the same time, Louis De Zoysa’s right hand was lifted up towards the right side of Louis De Zoysa’s head.
“The actions of Louis De Zoysa and (the male officer struggling with him) both affected where the gun was pointing. Their actions combined to make the gun point up towards the left wall of the cell.
“As the gun was raised, Louis De Zoysa fired the gun a third time. The shot hit the left wall of the cell.”
Mr Penny said the male officer then wrestled De Zoysa to the ground while a female officer took hold of her taser and tried to fire it twice.
In the 16 seconds after the shot hit the wall, the jury was told, De Zoysa was on the floor on his left side – with his gun underneath him.
A muffled bang was then heard, which the prosecution said was the fourth shot which caused the injuries to De Zoysa.
Mr Penny said: “Any electrical charge from the taser cannot have caused Louis De Zoysa to fire the fourth shot because the gunshot can be heard before the taser.”
During the trial a ballistics expert demonstrated to a jury how the antique revolver worked, and gave jurors the chance to hold the weapon and fire plastic bullets from it.
Forensic scientist and ballistics expert Anthony Miller explained that the gun was loaded with dummy bullets and was completely safe to be used in the court room, although it was aimed at the ceiling while being fired as an extra precaution.
Mr Miller told the court he had examined the revolver and the ammunition that was recovered after the incident.
Asked by prosecutor Duncan Penny KC if the gun went off by accident during his rigorous testing, Mr Miller said it did not.
Speaking in short and simple sentences so De Zoysa, who suffered brain damage after being hit in the neck by a bullet during the incident, could follow proceedings, Mr Miller said: “I dropped it on the ground, I struck it with a cloth-faced hammer and I generally treated it roughly.”
The jury found De Zoysa “pulled the trigger on purpose four times” while he was handcuffed in a holding room at the custody centre in Croydon, south London, on September 25 2020.
The first and second shots hit Sgt Ratana, the third hit the wall during a struggle with officers and a fourth hit De Zoysa himself.
Prosecutors said the gun and holster were “probably concealed under one of his armpits” when he was first arrested.
De Zoysa had been detained on London Road, Norbury, south London, during the early hours of September 25 2020 after a stop and search by officers found he had cannabis and seven rounds of ammunition on him, put handcuffed in the back of a police van and taken to the custody centre.
De Zoysa, who sat in the dock in a wheelchair alongside an intermediary, denied murder.
Following the conviction on Friday, Metropolitan Police Commissioner Sir Mark Rowley has paid tribute to Mr Ratana as an "outstanding" police officer who "made an enduring impact wherever he went".
Speaking at a press conference outside Northampton Crown Court, he said: "Matt dedicated 30 years of his life to policing and he was nearing retirement when he was tragically murdered.
"He was an outstanding officer who brought joy to his work. He treated everyone with respect, with compassion and with good humour.
"Whether it was on the streets or in the custody centre, as a uniformed police officer, on the rugby field or later as a coach, it's clear that he was someone who made an enduring impact wherever he went.
"We will ensure that he's never forgotten."