On his final day in office, President Obama urged Congress to permanently close the prison at Guantanamo Bay even after Republicans opposed the administration’s efforts to shut it down.

“If this were easy, we would have closed Guantanamo years ago. But history will cast a harsh judgment on this aspect of our fight against terrorism and those of us who fail to bring it to a responsible end,” Mr. Obama wrote in a letter to Speaker Paul Ryan, R-Wisconsin and Sen. Orrin Hatch, R-Utah, the president pro tempore of the Senate.

There is bipartisan support, the president said, for closing the prison, adding that it can be done in a responsible way that can save U.S. taxpayer money.

Get Breaking News Delivered to Your Inbox

“Guantanamo is contrary to our values and undermines our standing in the world, and it is long past time to end this chapter in our history,” he said.

Mr. Obama stressed that the detention facility, open for the last 15 years, has undermined U.S. national security, since it drains military funding, terrorists use it for propaganda and it harms partnerships with allies, he said.

Under his administration, 196 detainees were transferred elsewhere, “with arrangements designed to keep them from engaging in acts that pose a threat” to the U.S., he said. Of the 800 detainees who’ve been imprisoned at the camp, Mr. Obama said that only 41 remain.

He blasted those in Congress who have opposed plans to shut it down.

“There is simply no justification beyond politics for the Congress’ insistence on keeping the facility open,” he said. “They have played politics above the ongoing costs to taxpayers, our relationships with our allies and the threat posted to U.S. national security by leaving open a facility that governments around the world condemn and which hinders rather than helps our fight against terrorism.”

This comes after Oman said last week that it has accepted 10 detainees from Guantanamo Bay.