U.S. troops walk on a road as the sun rises over the razor-wired detention compound at Guantanamo Bay U.S. Naval Base, Cuba. ((Brennan Linsley/Associated Press))

Portugal has agreed to accept two Syrian prisoners from Guantanamo Bay on humanitarian grounds, the government said Friday.

They will be granted special visas under a law covering humanitarian concerns or national interest, the Foreign Ministry said in a statement on its website.

The decision "safeguards aspects related to security (and) the prospects for the successful integration of the chosen former inmates," said the statement.

It didn't name the two or say when they would arrive.

Portugal is the third European Union country to accept prisoners from the controversial military detention centre, which U.S. President Barack Obama has pledged to close by January. He asked European nations to accept some of the camp's more than 200 detainees — some of whom cannot return safely to their home countries.

In December, Portugal's foreign minister, Luis Amado, urged other EU countries to help the U.S. by accepting detainees.

France and Ireland have agreed to take a total of three prisoners while some former detainees have been sent to Albania and Bermuda. The remote Pacific island nation of Palau has also agreed to resettle up to 17 Chinese Muslims at the prison.

Britain says it will only accept detainees who have citizenship or residency ties while Germany and Sweden say they've already helped out by taking in refugees from other conflicts.

One Canadian remains at Guantanamo — Omar Khadr. The Toronto-born man was captured by American soldiers during a battle in Afghanistan in 2002 when he was 15 years old. The Pentagon alleges he threw a grenade that killed an American soldier.

With files from The Associated Press