Spanish prosecutors have decided to press forward with a criminal investigation targeting former U.S. Attorney General Alberto Gonzales and five top associates over their role in the torture of five Spanish citizens held at Guantánamo, several reliable sources close to the investigation have told The Daily Beast. Their decision is expected to be announced on Tuesday before the Spanish central criminal court, the Audencia Nacional, in Madrid. But the decision is likely to raise concerns with the human-rights community on other points: They will seek to have the case referred to a different judge.

Both Washington and Madrid appear determined not to allow the pending criminal investigation to get in the way of improved relations.

The six defendants—in addition to Gonzales, Federal Appeals Court Judge and former Assistant Attorney General Jay Bybee, University of California law professor and former Deputy Assistant Attorney General John Yoo, former Defense Department general counsel and current Chevron lawyer William J. Haynes II, Vice President Cheney’s former chief of staff David Addington, and former Undersecretary of Defense Douglas J. Feith—are accused of having given the green light to the torture and mistreatment of prisoners held in U.S. detention in “the war on terror.” The case arises in the context of a pending proceeding before the court involving terrorism charges against five Spaniards formerly held at Guantánamo. A group of human-rights lawyers originally filed a criminal complaint asking the court to look at the possibility of charges against the six American lawyers. Baltasar Garzón Real, the investigating judge, accepted the complaint and referred it to Spanish prosecutors for a view as to whether they would accept the case and press it forward. “The evidence provided was more than sufficient to justify a more comprehensive investigation,” one of the lawyers associated with the prosecution stated.

But prosecutors will also ask that Judge Garzón, an internationally known figure due to his management of the case against former Chilean dictator Augusto Pinochet and other high-profile cases, step aside. The case originally came to Garzón because he presided over efforts to bring terrorism charges against the five Spaniards previously held at Guantánamo. Spanish prosecutors consider it “awkward” for the same judge to have both the case against former U.S. officials based on the possible torture of the five Spaniards at Guantánamo and the case against those very same Spaniards. A source close to the prosecution also noted that there was concern about the reaction to the case in some parts of the U.S. media, where it had been viewed, incorrectly, as a sort of personal frolic of Judge Garzón. Instead, the prosecutors will ask Garzón to transfer the case to Judge Ismail Moreno, who is currently handling an investigation into kidnapping charges surrounding the CIA’s use of facilities as a safe harbor in connection with the seizure of Khalid el-Masri, a German greengrocer who was seized and held at various CIA blacksites for about half a year as a result of mistaken identity. The decision on the transfer will be up to Judge Garzón in the first instance, and he is expected to make a quick ruling. If he denies the request, it may be appealed.

Judge Garzón’s name grabs headlines in Spain today less because of his involvement in the Gonzales torture case than because of his supervision of the Gürtel affair, in which leading figures of the conservative Partido Popular in Madrid and Valencia are now under investigation or indictment on suspicions of corruptly awarding public-works contracts. Garzón is also the nation’s leading counterterrorism judge, responsible for hundreds of investigations targeting Basque terrorist groups, as well as a major recent effort to identify and root out al Qaeda affiliates operating in the Spanish enclaves of North Africa.

Announcement of the prosecutor’s decision was delayed until after the Easter holiday in order not to interfere with a series of meetings between President Barack Obama and Spanish Prime Minister José Zapatero. However, contrary to a claim contained in an editorial on April 8 in the Wall Street Journal, the Obama State Department has been in steady contact with the Spanish government about the case. Shortly after the case was filed on March 17, chief prosecutor Javier Zaragoza was invited to the U.S. embassy in Madrid to brief members of the embassy staff about the matter. A person in attendance at the meeting described the process as “correct and formal.” The Spanish prosecutors briefed the American diplomats on the status of the case, how it arose, the nature of the allegations raised against the former U.S. government officials. The Americans “were basically there just to collect information,” the source stated.The Spanish prosecutors advised the Americans that they would suspend their investigation if at any point the United States were to undertake an investigation of its own into these matters. They pressed to know whether any such investigation was pending. These inquiries met with no answer from the U.S. side.

Spanish officials are highly conscious of the political context of the case and have measured the Obama administration’s low-key reaction attentively. Although Spain is a NATO ally that initially supported “the war on terror” under Bush with a commitment of troops in both Iraq and Afghanistan, relations with the Bush administration deteriorated after Zapatero became prime minister and acted quickly to withdraw the Spanish contingent in Iraq. In the 2008 presidential campaign, Republican John McCain referred to Spain as a hostile state in comments that mystified Spaniards (it appears that McCain may have confused Spain with Venezuela and Zapatero with Hugo Chávez). Recently, the United States and Spain also wrangled over Spain’s decision to withdraw its troop commitment in Kosovo as well. Both Zapatero and Obama, however, have given a high priority to improving relations between the two long-standing allies. Spanish newspapers hailed the fact that Obama referred to Zapatero three times as “my good friend” during the recent European summit meetings, a sharp contrast with meetings at which former President Bush gave Zapatero a cold shoulder.

Both Washington and Madrid appear determined not to allow the pending criminal investigation to get in the way of improved relations, which both desire, particularly in regard to coordinated economic policy to confront the current financial crisis and a reshaped NATO mandate for action in Afghanistan. With the case now proceeding, that will be more of a challenge. The reaction on American editorial pages is divided—some questioning sharply why the Obama administration is not conducting an investigation, which is implicitly the question raised by the Spanish prosecutors. Publications loyal to the Bush team argue that the Spanish investigation is an “intrusion” into American affairs, even when those affairs involve the torture of five Spaniards on Cuba.

The Bush Six labored at length to create a legal black hole in which they could implement their policies safe from the scrutiny of American courts and the American media. Perhaps they achieved much of their objective, but the law of unintended consequences has kicked in. If U.S. courts and prosecutors will not address the matter because of a lack of jurisdiction, foreign courts appear only too happy to step in.

Scott Horton is a law professor and writer on legal and national-security affairs for Harper's magazine and The American Lawyer, among other publications.