A prominent liberal judge, joined by a conservative colleague, had some harsh words Friday about far-reaching government sting operations and the courts that approve them. It can’t have been good news for the defense in another undercover case, the Bay Area investigation that resulted in charges against 29 defendants, including state Sen. Leland Yee.

Friday’s opinion came in an Arizona case in which the Bureau of Alcohol, Tobacco and Firearms told an undercover informant to go to bars in seedy areas and recruit would-be robbers, after a wave of holdups in drug houses. The informant dangled the prospect of a big payoff and eventually found four men, one of whom boasted about past robberies. They went with a federal agent, posing as a courier, to the site of a supposed drug stash house, where other agents arrested them and found guns they had brought along. Their convictions carried mandatory sentences of at least 10 years in prison, based on the amount of cocaine they were planning to steal.

The Ninth U.S. Circuit Court of Appeals in San Francisco upheld the four men’s convictions in a 2-1 ruling in October, rejecting claims of entrapment and outrageous government conduct. While the government had staged the operation and written the script, the court majority said, the four men responded eagerly and didn’t need much inducement from the agents.

The full court left that ruling intact Friday, denying a defense request for a new hearing. In dissent, liberal Judge Stephen Reinhardt — joined by the much more conservative Chief Judge Alex Kozinski — said the ruling gives federal agents free rein to entice people into made-up crimes with the promise of a big payoff.

“When the government decides to troll through poverty-stricken neighborhoods, ordering its agents to seek out people who look ‘bad’ and test them at random for willingness to break the law in order to obtain large sums of money, its conduct is inappropriate,” Reinhardt said.

Reinhardt said stings should target ongoing criminal operations and shouldn’t be aimed at the general population — or, as in this case, poor neighborhoods, where people desperate for money might grab for the supposed riches, exaggerate their crimnal pasts and suddenly find themselves facing a decade or more in prison.

It’s the same sort of criticism that has been voiced by some defense lawyers in the Bay Area case since charges were announced March 26 against more than two dozen defendants, including Yee, a San Francisco Democrat who had been running for California secretary of state. The charges stem from a five-year undercover investigation in which agents offered cash for a variety of criminal activities — dealing in drugs and weapons, and, in Yee’s case, importing illegal firearms and promising political favors in exchange for campaign contributions.

“The government created the crime, the government financed the crime, and the government ensnared my client,” said Tony Serra, lawyer for Raymond “Shrimp Boy” Chow, a onetime Chinatown gang leader accused of laundering money agents paid him for illicit activities.

Or, in the words of James Brosnahan, lawyer for Keith Jackson — Yee’s former consultant and fundraiser, and a former San Francisco school board president — the crimes charged against Jackson, including conspiring with Yee in political corruption and setting up a purported murder for hire, existed only “in the imagination of FBI agents.”

Such arguments might not get very far in court, based on Reinhardt’s assessment Friday that the Ninth Circuit’s Arizona ruling “virtually eliminates constitutional limits on outrageous government conduct.”

Donald MacPherson, a defense lawyer in the Arizona case, said he’ll seek review by the U.S. Supreme Court.

“There’s enough crime out there,” MacPherson said. “They ought to do sting operations against ongoing, existing crimes instead of manufacturing crimes.”

The original ruling can be viewed here, http://cdn.ca9.uscourts.gov/datastore/opinions/2013/10/25/11-10036%20web%20corrected.pdf, and Friday’s dissent here: http://cdn.ca9.uscourts.gov/datastore/opinions/2014/05/02/11-10036.pdf.