Spain is willing to take five inmates of the U.S. Guantanamo Bay prison, Foreign Minister Miguel Angel Moratinos said on Monday.

U.S. President Barack Obama promised to close the widely criticized jail set up by his predecessor, George W. Bush, during his first year in office, but the deadline passed in January and 192 detainees remain.

Spain agreed to take Guantanamo inmates last year as relations between Madrid and Washington began to thaw when Prime Minister Jose Luis Rodriguez Zapatero visited the White House for the first time since withdrawing troops from Iraq in 2004.

Relations suffered a setback this month when Obama said he would not attend a United States-European Union summit which Spain had hoped to host in Madrid in May to mark its six-month stint as the bloc's president.

Moratinos declined to give the nationalities of the prisoners under discussion.

It will obviously be done with every legal guarantee needed in order to defend the country's security and legal situation, Moratinos told journalists.

About 10 EU member states have so far accepted detainees.

(Reporting by Blanca Rodriguez; Writing by Martin Roberts)