(Reuters) - A U.S. judge on Monday acquitted a former top foreign exchange trader at Barclays Plc accused of illegally trading ahead of an $8 billion transaction for Hewlett-Packard Co, without letting the case go to a jury.

The acquittal of Robert Bogucki, who led Barclays’ foreign exchange trading desk in New York, by U.S. District Judge Charles Breyer in San Francisco sets back federal efforts to hold senior bankers and traders criminally responsible for suspected misconduct.

It also marks a rare instance of such a case being tossed out immediately after the prosecution presented its case at trial, because the evidence was too weak to support a conviction. Bogucki’s trial began on Feb. 21.

A spokesman for U.S. Attorney David Anderson in San Francisco said that office was reviewing Breyer’s decision.

“We are so very pleased that the court recognised Mr. Bogucki’s innocence and affirmed that the government’s attempt to rewrite the rules years after the fact runs counter to core constitutional principles of due process,” Sean Hecker, a lawyer for Bogucki, said in a statement.

Bogucki was charged with “front-running” a 2011 transaction involving the sale of 6 billion pounds of cable options linked to HP’s purchase of British software company Autonomy Corp.

Prosecutors accused Bogucki of trying to push down the options’ price, enabling Barclays to profit at HP’s expense.

An indictment quoted Bogucki warning a trader not to let “some loose lipped market monger” tell HP what they were doing, and the trader discussing their plan to “spank the market.”

Breyer, however, said no reasonable jury could find that Bogucki owed HP a duty of trust and confidence.

He also said the relationship between Barclays and HP, industry practice and other factors necessitated an acquittal.

“The government has pursued a criminal prosecution on the basis of conduct that violated no clear rule or regulation, was not prohibited by the agreements between the parties, and indeed was consistent with the parties’ understanding of the arms-length relationship in which they operated,” Breyer wrote.

“The court cannot permit this case to go to the jury on such a basis,” he added.

Though such banks as Barclays, Citigroup Inc, JPMorgan Chase & Co and Royal Bank of Scotland Group Plc have pleaded guilty in connection with foreign exchange markets, few individuals have been held criminally liable.

Last October, a Manhattan federal jury found three former currency traders from Barclays, Citigroup and JPMorgan not guilty of scheming to rig benchmark exchange rates.

The case is U.S. v. Bogucki, U.S. District Court, Northern District of California, No. 18-cr-00021.