A federal judge in Brooklyn granted the government’s request to remove James Cole, a former official at the Justice Department, from defending Huawei Technologies Co. and Huawei Device USA, which the U.S. has accused of violating sanctions on Iran.

U.S. District Judge Ann Donnelly acted after federal prosecutors argued that Cole, during a stint as deputy attorney general, had access to classified matters they argued have a “substantial” connection to Huawei.

Donnelly held a hearing in September that was partly sealed because classified matters were discussed. During the public segment, she questioned an argument by Huawei’s lawyers that Cole, a partner at Sidley Austin LLP, should be permitted to remain on the case because he doesn’t remember them.

“If there really is a conflict, and in the middle of the trial, all of a sudden, a memory is triggered, we don’t want to be in that position, do we?” Donnelly said.

Assistant U.S. Attorney David Kessler said at the hearing that while Cole served as Attorney General Eric Holder’s deputy from 2011 to 2015, he had been privy to discussions of a “prior matter” that had a “substantial relationship to this one.” A lawyer for Huawei, Michael Levy, argued that the request to remove Cole was “part of an overall agenda which the government has against Huawei” and a tactical step to hobble the defense.

Cole couldn’t immediately be reached for comment on the decision. Kellie Mullins, a spokeswoman for Sidley, didn’t return voicemail or email messages seeking comment. John Marzulli, a spokesman for U.S. Attorney Richard Donoghue in Brooklyn, declined to comment.

Donnelly didn’t issue a public ruling Tuesday, only posting an order on the court docket. She said she would issue an unclassified, redacted decision by Jan. 10.

The case is U.S. v. Huawei Technologies Co., 18-cr-457, U.S. District Court, Eastern District of New York (Brooklyn).