FILE PHOTO: The flag over a war crimes courtroom in Camp Justice at US Naval Base Guantanamo Bay in Cuba in this photo reviewed by the U.S. Department of Defense on October 17, 2012, day three of pre-trial hearings for the five Guantanamo prisoners accused of orchestrating the 9/11. REUTERS/Michelle Shephard/Pool

ON BOARD AIR FORCE ONE (Reuters) - President Donald Trump expressed unhappiness on Wednesday with the cost of keeping open a controversial prison at the U.S. military base in Guantanamo Bay, Cuba and said his administration was studying the issue.

Trump, a Republican who has previously argued that the prison should stay open, declined to say what he would like to happen with the facility now.

“It costs a fortune to operate it, and I think it’s crazy,” the president told reporters on Air Force One.

Trump noted that his predecessor, Democratic President Barack Obama, had pledged to have the prison cleared of its occupants and shuttered by the time he left office but did not succeed.

“So we’re stuck with it,” Trump said. “We’re taking what he left and that’s where we are right now; we’re going to make some decisions.”

The Guantanamo prison drew worldwide condemnation during Republican President George W. Bush’s administration, which kept scores of international prisoners locked up there in the aftermath of the September 11, 2001 attacks on New York and Washington and the subsequent U.S. war against the Taliban in Afghanistan.

Obama pledged to close the prison, which he believed did not project U.S. values, but he could not overcome opposition in Congress.

It was unclear on Wednesday whether Trump meant to signal a potential shift in policy or simply launch a round of criticism against Obama. His remarks appeared to be designed more to highlight a promise that his predecessor was unable to keep rather than a pledge to do something new about the issue himself.