A federal judge in Chicago called Monday for the ATF’s fictitious drug-stash-house sting operation to be “relegated to the dark corridors of our past” because of racial disparities that “generate great disrespect for law enforcement efforts.”

Despite tactics he said were flawed from start to finish, U.S. District Chief Judge Ruben Castillo said he could not toss criminal charges in two cases because defense attorneys had “failed to meet the heavy burden” the law required.

Instead, Castillo concluded the future of the two cases is “squarely within the discretion” of John Lausch, Chicago’s new U.S. attorney.

“This country cannot afford such self-inflicted wounds in light of its sad history of racism,” Castillo said.

A spokesman for Lausch declined to react to the ruling. And attorneys for the defendants also declined to comment.

Castillo’s ruling drew attention across the nation. It also followed years of litigation that led in December to a rare joint hearing in which nine judges presiding over 12 cases in Chicago heard hours of testimony from competing experts over racial disparities.

Castillo was the first of the judges to rule. Others may reach different conclusions.

At issue is an ATF sting in which agents present suspects with the opportunity to rob a drug stash house that in reality doesn’t exist. Between 2006 and 2013, black defendants made up 74 of the 94 people charged here as a result. Columbia Law School professor Jeffrey Fagan said there was an “almost zero” percent chance it happened properly.

However, Castillo said he found “significant problems” with Fagan’s analysis. And while he said he may have ruled differently as an appellate judge or one who serves “on the shores of the Potomac River,” he felt obliged to honor guidance from the Supreme Court even though he didn’t necessarily agree with it.

In a sign of how seriously he took the issue, Castillo had the door to his 25th floor courtroom locked to stop people from milling in and out while he read the first six pages of his 73-page opinion. Before he began, he noted he was once targeted in a murder contract foiled through the work of undercover agents posing as hitmen.

Castillo wrote in the opinion that “the answer to our nation’s current tragic pattern of weapons violence lies in stricter firearms regulations, especially with respect to automatic, multi-round weapons and traditional law enforcement investigative techniques.” He noted the 89th anniversary last month of the St. Valentine’s Day Massacre, “which killed seven Chicagoans with automatic weapon fire.”

The judge wrote that the ATF did not respond with “false alcohol warehouse” stings “against any ethnic organized crime groups.” Rather, he wrote, it used “solid investigative work to garner the great public respect of the Eliot Ness era that still lives today as the gold standard of law enforcement.”

Meanwhile, he wrote that the local stash-house cases have helped to “undermine legitimate law enforcement efforts in this country.”

“Disrespect for the law simply cannot be tolerated during these difficult times,” Castillo wrote.