They were running guns — and their mouths.

Brooklyn cops broke up a huge, Virginia-based weapons-smuggling outfit and seized 217 weapons — the biggest firearms bust in the borough’s history, authorities said Wednesday.

Gun runners were caught on tape boasting about the commonwealth’s weaker gun laws that allowed them to easily assemble their cache of weapons, which they sold up north, according to police and prosecutors.

Suspect Antwan Walker was recorded on a wiretap saying there’s a nonstop flow of legally purchased guns in Virginia — so much so, said Walker, that “In Virginia I can give guns away.”

“If we can get paid for doing this, you know what I mean? I can buy a gun and go to the same store tomorrow,” Walker said in wiretaps, “and I can do that Monday through Friday.”

Walker was also recorded telling a colleague that their business was all about volume.

“We are trafficking. We are the big dogs,” he said in recordings played by the NYPD and Brooklyn DA. “We’re in this to get the orders up.”

All the weapons seized were purchased legally by suspects or their straw buyers in Virginia, officials said.

“We’re going to go after anyone who brings illegal firearms into our city and into our borough,” acting Brooklyn DA Eric Gonzalez told reporters, standing behind a podium and displaying some of the seized guns.

The weapons included AK-47s, AR-15s, Tommy guns, Mossberg 715Ts and MAC-10s, officials said.

Handguns seized included .45-caliber Desert Eagle 1911s, Glocks with extended ammunition magazines and various other .45-caliber, .40-caliber, .380-caliber and 9mm weapons.

The Brooklyn DA and cops said between 40 and 50 guns seized were not shown at a press conference Wednesday — because they couldn’t all fit on the tables available.

All 217 weapons were purchased through one NYPD cop, working undercover and making multiple buys.

“Just think of the damage these guns could’ve caused if they had gotten into the wrong hands,” Gonzalez said. “In my mind, we have prevented misery and death.”

Of the 24 people arrested in this sweep, 22 are Virginia residents, officials said.

They were charged in a 627-count indictment with various weapons crimes, including conspiracy to traffic guns purchased in Virginia.

“In this unique case, we charged more defendants and recovered more firearms than in any other case in Brooklyn’s history,” Gonzalez said.

“We will go wherever we must, including other states, to continue fighting the scourge of firearms trafficking. We will not rest until every individual allegedly importing illegal guns into our borough — and with them, death and violence — has seen their names on an indictment like this one.”

NYPD Commissioner James O’Neill bemoaned the number of guns that make it over state lines into New York.

“Over and over again, New York City finds itself the final destination for illegal firearms,” he said.

“Too often our citizens become victims of the associated gun violence. Our investigators and prosecutors will continue to relentlessly pursue those responsible for trafficking in illegal guns, wherever they are.”

Leaders of the scheme were identified as Damian “Havoc” King, Jacquan “Madcat” Spencer and Levar “Wavy Boy” Shelborne.

The defendants were arrested last week, mostly in Virginia.

The sweep caps a probe that began last June and targeted Bloods gang members in both New York and Virginia.

The Virginia operation had roots in Henrico and Richmond counties, as well as the cities of Hampton and Newport News.

Gun runners brought two to 12 guns at a time from Virginia to New York, usually in their own cars, to complete sales in Gotham, authorities said.

The sales went down in several spots across Brooklyn, including Bedford-Stuyvesant, Fort Greene, Sunset Park and Boerum Hill, officials said.

Prices varied between $800 and $1,200 per handgun and from $1,800 to $2,200 for assault weapons, authorities said.

A key Brooklyn contact in the pipeline was identified as Bed-Stuy resident Aaron Perry, prosecutors said.

He allowed Spencer to stay at his place and even played host to at least eight buys there.

Additional reporting by David K. Li