A band of current and retired cops and their associates, including five from Staten Island, ran assault rifles, stolen slot machines, and cigarettes across state lines, according to federal authorities.

Eight active and retired NYPD officers, many of them out of Brooklyn's 68th Precinct, and four others were arrested today on a variety of federal charges, after being snared in a two-year FBI and NYPD internal affairs sting operation.

In all, the ring smuggled three M-16 assault rifles, a shotgun, and 16 firearms -- many with the serial numbers defaced -- as well as stolen slot machines, stolen cigarettes, and counterfeit goods, never realizing that their clients were, in fact, a confidential informant and an undercover law enforcement officer, according to a complaint filed in Manhattan federal court.

They planned routes to avoid police detection -- renting mini-vans instead of Ryder trucks and U-Hauls to look less conspicuous -- and planned to use their badges and status as police officers to bluff their way out of trouble if they were pulled over, the court complaint alleges.

It's the latest in a series of high-profile black eyes for the NYPD, which has been rocked in recent months by a ticket-fixing scandal in the Bronx; federal court testimony in September by a former narcotics detective alleging that officers often plant drugs on suspects; and just last week, the arrest of a Staten Island anti-crime unit officer on civil rights, attempted extortion and wire fraud charges.

"The complaint describes how a group of crime fighters took to moonlighting as criminals, how a gang of police officers who should have been keeping guns off the street instead smuggled 20 firearms into the city, and how a number of men, once charged with enforcing the law are now charged with breaking it," said Preet Bharara, the U.S. Attorney for the Southern District of New York.

The sting got its start when, authorities allege, a confidential informant seeking to "fix" NYPD traffic tickets was introduced to William Masso, 47, of Brooklyn, an officer working a midnight tour in Bay Ridge's 68th Precinct, in late 2009.

It was unclear whether the ticket-fixing reference has any connection to the Bronx investigation.

The two struck up several conversations, and by April 2010, they were talking about selling and transporting "stolen" cigarettes, according to the complaint.

And Masso offered to bring others into the mix, according to a recorded conversation quoted in the complaint: "(A) retired cop, active cop, ex-cop, bad guy... I have good guy, bad guy, like my partner's saying, whatever he wants we get -- one guy seven-foot tall, with muscles out to here. We get him. You want a guy who beat the s--t out of somebody who bothers him, we got that. We got cops with vests and guns."

Masso's helpers ultimately included two more active officers and three retired officers from the 68th Precinct, a member of the Brooklyn South Task Force, an officer out of the 71st Precinct in Crown Heights, a former NYC Sanitation Department police officer, an active-duty New Jersey Corrections officer and two other men, authorities said.

"The vast majority of police officers do outstanding work to protect the city," Police Commissioner Raymond Kelly said. "A case like this is disheartening to the entire department."

Starting in September 2010, the ring transported cigarettes and slot machines for the informant and the undercover, who were posing as dealers in stolen goods, court papers allege.

The guns came later, with the big 20-firearm shipment from New Jersey, through Staten Island, and ultimately to a warehouse on Long Island, on Sept. 22, 2011.

Those guns were rendered inoperable by the FBI, but Masso and his accomplices didn't know that, Kelly said.

"For all he knew, they were fully capable of being fired at a human being. What is outlined in the complaint was a betrayal of his oath, of the highest ordered." Kelly said. "And for what? $6,000. That's the amount Masso was purportedly paid to transport the guns, according to the complaint."

At first, Masso and others fretted that they were using U-Haul and Ryder trucks, which are often the targets of spot checks by police, and about their cut of the proceeds.

"Listen. When you're doing stuff like this, you gotta be intelligent. You gotta take every, you gotta look at every pinpoint of everything and you gotta set it up where if I'm a cop on the side of the road am I gonna stop that Ryder truck there?" Masso explained to the informant on one occasion, the complaint alleged.

They later replaced the trucks with rental minivans -- which they saw as less of a risk to get pulled over -- and devised a cover story that they were police officers working off-duty to deliver items someone else had purchased at auction.

Said FBI Special Agent in Charge Diego Rodriguez: "Law enforcement officers are rightly held to a higher standard of conduct than the public at large. We accept that and embrace it. It is fundamental to the work we do. At a very minimum, the public has the right to expect that those sworn to enforce the law will themselves abide by the law."

In a statement released today, Mayor Michael Bloomberg said that if the charges are proved true, "it would be a disgraceful and deplorable betrayal of the public trust."

Bloomberg has long been outspoken against restricting the flow of out-of-state guns into the city, with his administration mounting sting operations around the country with the use of undercover investigators.

"The NYPD is the finest police department in the world, and these arrests do nothing to diminish the selfless commitment of the 35,000 men and women who put on a uniform every day, and who put their lives on the line to keep us safe."