The US is not sure what to do with release Guantanamo inmates
Spain's foreign minister has said his country is prepared "in principle" to take in some inmates released from the Guantanamo Bay US military camp.
Miguel Angel Moratinos was speaking after a meeting with US Secretary of State Hillary Clinton in Washington.
He said Spain would consider taking prisoners on a case by case basis and only under acceptable legal conditions.
About 250 people are still held in the camp, which President Barack Obama has ordered to be shut down within a year.
However questions remain over where the inmates will be sent once released.
Among them are several high risk prisoners, including the man believed to have mastermind the 9/11 attacks, Khalid Sheikh Mohammed, and other al-Qaeda or Taleban suspects.
Some are expected to face trial but there are concerns that of the 60 or so inmates cleared for release, some would need to be transferred to third countries as their home nations have poor human-rights records.
Mr Moratinos said Mrs Clinton had asked him for "help in solving this drama, this unacceptable tragedy of the prisoners at Guantanamo".
Mr Moratinos said Mrs Clinton had asked for help with Guantanamo
"We are prepared to cooperate. Our teams will make contact to legally study each case on a case by case basis," he told Spanish media.
In January, Mr Obama signed orders to close the controversial prison camp "no later than one year from now" as well as all overseas CIA detention centres.
He also ordered a review of military trials for terror suspects and a ban on harsh interrogation methods.
Relations between Spain and the US were strained after Socialist Prime Minister Jose Luis Rodriguez Zapatero was elected in March 2004 and fulfilled a campaign promise to withdraw all 1,300 Spanish soldiers serving in the US-led war in Iraq.
But Mr Moratinos said the meeting with Mrs Clinton heralded "a new stage in relations between the United States and Spain is opening that is more intense, more productive".