Mr. Angilau was one of more than a dozen accused members of the gang who had been indicted in 2010 on a wide range of federal charges. His trial was the last of the lot, the authorities said.

Jurors had taken their seats in the courtroom of Judge Tena Campbell, and a cooperating witness was testifying for prosecutors when chaos erupted about 9:25 a.m. Mr. Angilau apparently grabbed a pen or pencil, charged toward the witness and was met by gunfire, said Melodie Rydalch, a spokeswoman for the United States attorney’s office.

Ms. Rydalch said it did not appear that Mr. Angilau was shackled at the time of the attack. Defendants who are held in lockup before their trials regularly wear handcuffs and jail uniforms at pretrial court appearances, but are often allowed to wear street clothes and are not visibly restrained when a jury is present to weigh their fate.

A statement from the F.B.I. said Mr. Angilau had rushed the witness stand in “an aggressive, threatening manner” and had been shot in the chest. He was taken to a hospital and pronounced dead on Monday afternoon, the statement said. No one else was hurt, officials said.