Criminal proceedings have begun in Spain against six senior officials in the Bush administration for the use of torture against detainees in Guantánamo Bay. Baltasar Garzón, the counter-terrorism judge whose prosecution of General Augusto Pinochet led to his arrest in Britain in 1998, has referred the case to the chief prosecutor before deciding whether to proceed.

The case is bound to threaten Spain's relations with the new administration in Washington, but Gonzalo Boyé, one of the four lawyers who wrote the lawsuit, said the prosecutor would have little choice under Spanish law but to approve the prosecution.

"The only route of escape the prosecutor might have is to ask whether there is ongoing process in the US against these people," Boyé told the Observer. "This case will go ahead. It will be against the law not to go ahead."

The officials named in the case include the most senior legal minds in the Bush administration. They are: Alberto Gonzales, a former White House counsel and attorney general; David Addington, former vice-president Dick Cheney's chief of staff; Douglas Feith, who was under-secretary of defence; William Haynes, formerly the Pentagon's general counsel; and John Yoo and Jay Bybee, who were both senior justice department legal advisers.

Court documents say that, without their legal advice in a series of internal administration memos, "it would have been impossible to structure a legal framework that supported what happened [in Guantánamo]".

Boyé predicted that Garzón would issue subpoenas in the next two weeks, summoning the six former officials to present evidence: "If I were them, I would search for a good lawyer."

If Garzón decided to go further and issued arrest warrants against the six, it would mean they would risk detention and extradition if they travelled outside the US. It would also present President Barack Obama with a serious dilemma. He would have either to open proceedings against the accused or tackle an extradition request from Spain.

Obama administration officials have confirmed that they believe torture was committed by American interrogators. The president has not ruled out a criminal inquiry, but has signalled he is reluctant to do so for political reasons.

"Obviously we're going to be looking at past practices, and I don't believe that anybody is above the law," Obama said in January. "But my orientation's going to be to move forward."

Philippe Sands, whose book Torture Team first made the case against the Bush lawyers and which Boyé said was instrumental in formulating the Spanish case, said yesterday: "What this does is force the Obama administration to come to terms with the fact that torture has happened and to decide, sooner rather than later, whether it is going to criminally investigate. If it decides not to investigate, then inevitably the Garzón investigation, and no doubt many others, will be given the green light."

Germany's federal prosecutor was asked in November 2006 to pursue a case against Donald Rumsfeld, the former defence secretary, Gonzales and other officials for abuses committed in Guantánamo Bay and Abu Ghraib prison in Iraq. But the prosecutor declined on the grounds that the issue should be investigated in the US.

Legal observers say the Spanish lawsuit has a better chance of ending in charges. The high court, on which Garzón sits, has more leeway than the German prosecutor to seek "universal jurisdiction".

The lawsuit also points to a direct link with Spain, as six Spaniards were held at Guantánamo and are argued to have suffered directly from the Bush administration's departure from international law. Unlike the German lawsuit, the Spanish case is aimed at second-tier figures, advisers to Bush, Cheney and Rumsfeld, with the aim of being less politically explosive.

The lawsuit claimed the six former aides "participated actively and decisively in the creation, approval and execution of a judicial framework that allowed for the deprivation of fundamental rights of a large number of prisoners, the implementation of new interrogation techniques including torture, the legal cover for the treatment of those prisoners, the protection of the people who participated in illegal tortures and, above all, the establishment of impunity for all the government workers, military personnel, doctors and others who participated in the detention centre at Guantánamo".

"All the accused are members of what they themselves called the 'war council'," court documents allege. "This group met almost weekly either in Gonzales's or Haynes's offices."

In a now notorious legal opinion signed in August 2002, Yoo and Bybee argued that torture occurred only when pain was inflicted "equivalent in intensity to the pain accompanying serious physical injury, such as organ failure, impairment of bodily function, or even death".

Another key document cited in the Spanish case is a November 2002 "action memo" written by Haynes, in which he recommends that Rumsfeld give "blanket approval" to 15 forms of aggressive interrogation, including stress positions, isolation, hooding, 20-hour interrogations and nudity. Rumsfeld approved the document.

The 1984 UN Convention against Torture, signed and ratified by the US, requires states to investigate allegations of torture committed on their territory or by their nationals, or extradite them to stand trial elsewhere.

Last week, Britain's attorney general, Lady Scotland, launched a criminal investigation into MI5 complicity in the torture of Binyam Mohamed, a British resident held in Guantánamo.

The Obama administration has so far avoided taking similar steps. But the possibility of US prosecutions was brought closer by a report by the Senate armed services committee at the end of last year, which found: "The abuse of detainees in US custody cannot simply be attributed to the actions of 'a few bad apples' acting on their own. The fact is that senior officials in the United States government solicited information on how to use aggressive techniques, redefined the law to create the appearance of their legality, and authorised their use against detainees."

None of the six former officials could be reached for comment yesterday. Meanwhile, Vijay Padmanabhan, a former state department lawyer, said the creation of the Guantánamo Bay detention camp was "one of the worst over-reactions of the Bush administration".