A federal judge has challenged the U.S. government’s move to drop charges against an Iranian man accused of sanctions violations as part of a U.S. prisoner trade agreed with Iran last month.

Federal prosecutors filed a motion on Jan. 16 to drop the case against Alireza Moazami Goudarzi, an Iranian man accused in 2012 of trying to buy aircraft parts for Iran, including those for military aircraft engines.

The dismissal was part of a wider deal which also saw U.S. officials move to drop international arrest orders and any charges against 13 other Iranians outside America. The administration also offered clemency deals to seven Iranians in the United States, mostly imprisoned for or charged with sanctions violations.

In return, Iran released five Americans it had been holding, including Iranian-American Washington Post reporter Jason Rezaian.

The release of the Americans coincided with the lifting of economic sanctions against Iran in return for curbs on Tehran’s nuclear program.

U.S. District Judge P. Kevin Castel in New York threatened in a court order last week to deny the government’s dismissal of charges against Goudarzi unless prosecutors could justify “significant foreign policy interests” they had cited as a reason to drop the case.

Castel wrote in his order that the court should not approve such a request if it is prompted by “considerations clearly contrary to the public interest.”

Castel is the only judge so far who is known to have questioned the dismissals, which were also filed in jurisdictions including Arizona, Washington, D.C. and California, Reuters found in a review of court records.

The prisoner swap left President Barack Obama’s administration open to criticism from Republicans that it had offered too much to Iran in return for the release of the Americans.

In a response to Castel’s order, Assistant U.S. Attorney John Cronan said on Monday that the prisoner swap was a “one-time, unique agreement based on extraordinary circumstances” that had been reached in order to obtain the release of American prisoners held in Iran.

“The United States Government has made clear to the Government of Iran that the United States does not expect to repeat these actions,” Cronan said in a court brief.

He also added that U.S. authorities had been unable to locate Goudarzi since he was released from Malaysian custody after being detained there in 2012, and there was no “realistic prospect” of arrest and extradition in the near future.

It is rare for judges to challenge dismissals by prosecutors, which are usually granted without extensive further inquiry, said David L. Hall, a former federal prosecutor.

“The court is basically saying, ‘I’m not a rubber stamp,'” said Hall, now a partner at law firm Wiggin and Dana in Philadelphia.