House lawmakers from both parties hammered federal law enforcement agents Tuesday over a botched gun-trafficking investigation — codenamed “Fast and Furious” — that put guns in the hands of some of Mexico’s most notorious drug gangs.

Representatives of the Bureau for Alcohol Tobacco and Firearms admitted that mistakes had been made in the operation, but officials at the Government Oversight and Reform Committee hearing tried to defend the operation as a well-intentioned effort gone wrong.

ATF representatives said they knew that guns — according to one estimate just over 1,000 firearms — were going to Mexico and ending up in the hands of criminals there, but that was the point: The ATF was attempting to trace the guns through criminal networks in order to track gun- and drug-trafficking routes.

“The goal of the operation was to disrupt, dismantle, and destroy drug cartels purposely, knowingly allowing the guns to go to Mexico,” said William Newell, the former special agent in charge for the ATF Phoenix field division.

Newell said in prepared testimony that the purpose of the operation was to get beyond the straw purchasers on the street and to make arrests up the chain of command in criminal organizations, but lawmakers criticized the operation as misconceived from the start.

Under questioning from Peter Welch (D-Vt.), Newell said that ATF agents would sell guns to buyers involved in criminal networks and would then follow those individuals and place them under surveillance.

Read more: