Dramatic footage has been released of the moment an alleged gang member launches himself at a witness inside a courtroom before being shot dead.
Siale Angilau was standing trial in Salt Lake City, Utah, when he suddenly got up from his place at the defendant's bench and grabbed a pen.
Angilau, who is believed to be a member of the Tongan Crip gang, ran towards the rival gangster testifying and attempted to attack him.
A US marshal fired four times at close range at the defendant inside as he rushed to the witness stand, jumped and swung with a pen at a shackled witness.
An investigation launched into the incident found the officer, who was not named, was legally justified in using force.
The footage taken in 2014 was released after a lawsuit brought by Angilau's family was dismissed.
Officials at the Department of Justice wanted the video kept under seal over concerns it could lead to retaliatory gang violence.
Faces of the judge,attorneys and jurors are blurred out to protect their identities.
US District Judge John Dowell said: “The video completely contradicts plaintiffs' argument that Angilau stopped posing a danger within less than one second of launching himself over the witness stand while making a stabbing motion with a pen in hand.
“Angilau was in custody, but he essentially had escaped custodial control for those seconds during which he was executing his plan to assault the witness. His attack was stopped by the shots that Jane Doe rapidly fired, in less than one and one-half seconds.”
The 25-year-old was standing trial on federal racketeering along with other charges including conspiracy, assault, robbery and weapons offences.
A mistrial was declared after the shooting.