Spanish Foreign Minister Miguel Angel Moratinos on Wednesday welcomed new US President Barack Obama's request that prosecutors seek a suspension of military trials at the controversial "war on terror" camp at Guantanamo Bay in Cuba.
"I wish to congratulate him on this decision," he told Punto Radio.
"I want to express Spain's satisfaction and support for this decision to close Guantanamo, which Spain and Europe have demanded on numerous occasions," he added.
Spain is willing to cooperate with Washington to help it close the detention centre at a US naval base on the southeastern tip of Cuba which currently holds some 250 men, the minister added.
"But first we have to see what the US justice department will do, what is the judicial status of each of these detainees," Moratinos said.
Human rights campaigners have said many inmates would face persecution if sent back to their home countries. Washington has cited a lack of resettlement options for them as an obstacle to closing the detention centre.
Last month Portugal said it was willing to grant asylum to Guantanamo detainees who cannot return to their home countries and urged other European Union nations to do the same.
Obama, who was sworn in on Tuesday, has vowed to close the military camp used to house "war on terror" suspects, which has become a symbol of US excesses around the world since it was set up in early 2002.
He issued the order regarding the suspension of the cases even before formally ordering the prison camp shut down and with pre-trial procedures already well underway.
Prime Minister Jose Luis Rodriguez Zapatero, meanwhile, said "the Spanish government will support very intensely the work of the Obama administration".
Zapatero had a frosty relationship with Obama's predecessor George W. Bush whom he angered by withdrawing Spanish troops from Iraq immediately after being elected for his first term as prime minister in March 2004.
Ties between Spain and the United States were further strained by Madrid's policy of holding political dialogue with Cuba. Washington has long sought to isolate the Communist island-state.