BERLIN (AFP) - Germany said Monday it would consider taking foreign inmates from Guantanamo if the United States closes its "War on Terror" jail. Deputy government spokesman Thomas Steg said Berlin strongly backed the pledge by US President-elect Barack Obama to shut down the prison in Cuba. "In our view Guantanamo must be closed on legal and humanitarian grounds, in terms of international law and human rights, and for moral reasons," Steg told reporters. He said it was the clear responsibility of the United States to find a place for inmates it did not want to accept and who could not be returned to their home countries. "We would need to, and want to, examine this issue when the United States has made clear what its specific plans and timeline are, Steg said. "If we begin to review such closure plans and take a stance, then it can only be in a European context based on a discussion with all member states," he said, adding that Germany would reject any "side deals, swaps or conditions" put forward by Washington linked to handing over Guantanamo prisoners. In a letter to European Union counterparts this month, Portuguese Foreign Minister Luis Amado said the EU should help the US close Gitmo by taking in detainees from third countries. The German govt's ombudsman on human rights, Guenter Nooke, launched a debate last week when he called for Berlin to take in some of the 17 ethnic Uighur Chinese held at Guantanamo. The Muslim group has been held in limbo at Guantanamo " despite being cleared for release by the US government " because officials cannot find a country willing to take them. The men cannot be returned to China because of fears they would be tortured there as political dissidents, US officials say. The prison, which currently holds about 250 inmates, was opened in early 2002 at a remote US naval base on the southeastern tip of Cuba as a way of holding detainees beyond the reach of US courts. Defence Secretary Robert Gates, who will be staying on with the new US administration, said last week that a hurdle to quickly closing the site has been getting countries to take prisoners who are no longer considered a threat. Rights groups have calls on EU countries to offer asylum to Guantanamo detainees.