SALT LAKE CITY -- Dramatic video released Monday shows a U.S. marshal firing four times at close range at a defendant inside a Utah federal courthouse after he rushed the witness stand, jumped and swung with a pen at a shackled witness who barely backed out of the way. The defendant died from his wounds.

The 24-second footage from the 2014 gang-related racketeering trial was released after a media coalition including CBS affiliate KUTV and The Associated Press argued it was a public record in an important police use-of-force case.

The video shows defendant Siale Angilau, a 25-year-old member of the Tongan Crip gang, calmly rising from his seat beside his attorney during the witness testimony and grabbing his lawyer's pen.

Get Breaking News Delivered to Your Inbox

As someone yells, "whoa, whoa, whoa," but before any officers could react, Angilau sprinted toward the witness and leaped with his right arm cocked overhead with the pen in hand.

The man jumped back to avoid being hit as Angilau fell feet-first over the front of the witness stand.

That's when the unidentified U.S. marshal shot Angilau four times.

In this image capture from video provided to CBS Salt Lake City affiliate KUTV, Siale Angilau, center, rushes the witness stand in a federal courtroom in 2014.

A woman cried out in horror while other law enforcement in suits ran toward the witness stand. Angilau's defense attorney jumped under a desk while prosecutors stood in shock.

A bailiff swiftly moved to block the entrance to the front of the courtroom and pointed at people in the gallery and told them to stay still with his right hand on his holstered weapon.

"Get on the ground," someone yelled in the direction of Angilau.

"Drop the pen. Drop the pen out of your hand," yelled an officer standing over Angilau.

As U.S. District Judge Tena Campbell was escorted out of the courtroom, someone called 911 at the end of the released video.

Former U.S. Attorney Brett Tolman told KUTV that Angilau told the judge he would behave so he didn't need to be shackled.

"When you have a jury, you always want the defendant to appear like he is in regular, you know, civilian clothes, that he's not in handcuffs, that he has a fair shot at being treated fairly by the justice system," Tolman told the station.

This 2014 photo provided by the Utah Department of Corrections shows Siale Angilau. Utah Department of Corrections via AP

The unidentified U.S. marshal was cleared of any wrongdoing shortly after the shooting. Lynzey Donahue, a spokeswoman for the Marshals Service, said in a statement the video "demonstrates how quickly violence can erupt, in any situation." She said the FBI cleared the officer of any wrongdoing and that a review board found the use of force was within agency policy.

Donahue also pointed to a ruling Friday from U.S. District Judge John Dowdell when he dismissed the Angilau family's wrongful death suit, citing the video as proof that the U.S. marshal, who is referred to as Jane Doe in his ruling, acted reasonably. The family argued Angilau only had a pen and the four shots fired were excessive.

"Having carefully reviewed the video of Mr. Angilau's swift flight from counsel table, his vault over the witness stand with pen in hand, and his attempt to violently attack the shackled witness, the court has little difficulty determining that (Jane) Doe's use of force to immediately stop Angilau's attack was objectively reasonable under the totality of the circumstances," Dowdell wrote.

The Angilau family attorney, Bob Skyes, offers a contradictory point of view. He said the video shows that the marshal "panicked" and should have used other methods to subdue Angilau. He points out that Angilau was already down on the ground for the final three shots and that a courtroom full of officers could have stopped him before he harmed anyone with the pen.

"There was no need to use deadly force," Sykes said. "They weren't entitled to use the death penalty on him for an assault."

Sykes said the Angilau family hasn't decided if they'll appeal the ruling throwing out the wrongful death lawsuit.

Angilau was one of 17 people named in a 2010 indictment accusing Tongan Crip members of assault, conspiracy, robbery and weapons offenses. He was the last defendant in the case to stand trial, with previous defendants being sentenced to 10 to 30 years in prison.

A mistrial was declared after the shooting.

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. The agency declined comment Monday about the release of the video.

The media coalition including KUTV and the AP fought for several years with government attorneys to have the video released publicly, arguing that the shooting raised questions about police use of force and upholding the principle of open courts.

Department of Justice attorneys said the media organizations wanted the video to "sell newspapers."