The men arrested had nicknames like Spider and Afro, and some literally wore their accomplishments on their sleeves. The “1% patch” they wore declared that they had rejected society and lived outside the law. And the “bangout patch,” showing two handguns crossing each other, signified that the member had assaulted or had another confrontation with the police.

Most of the gun sales were made in tattoo parlors, the police said.

The defendants, ranging in age from 33 to 61, were scheduled to be arraigned in Federal District Court in Brooklyn on Tuesday afternoon, but only three made court appearances. Four others were taken to the hospital for heroin detoxification and treatment for high blood pressure. The men face up to five years in prison if convicted.

Officials said the leader of the trafficking scheme was Scott Brannigan, known as the Spider. Prosecutors said Mr. Brannigan, 61, sold 16 firearms and about 1,400 rounds of ammunition, including armor-piercing rounds, to an undercover officer. The most expensive of the arms, at $2,000, was the cannon, which came with ammunition and the black powder necessary to fire it.

The first undercover gun buy was in October 2010. The confidential informer led an undercover officer to a tattoo parlor on Rockaway Beach Boulevard in Queens. At a nearby house, the informer paid $1,000 for a Yugoslavian assault rifle and ammunition, while the undercover officer looked on. It went on like that, the police said, for the next two years.