Just two days after his inauguration, President Obama signed an executive order calling for the closing of Guantanamo Bay detention facility within one year. Nearly two years later, it remains open. Why did the administration fail to meet its goal?

The truth is that Obama's order was driven by ideology, not reality. His left-wing base insisted that Guantanamo be shuttered. But he and his staff knew little about the facility.

It took a full year for a task force to review the government files on each detainee. And it turned out not one was an innocent goat herder.

The Bush administration tried for years to shutter the detention camp, but ran into significant problems like Yemen. More than 40 percent of approximately 240 detainees Obama inherited were Yemeni.

The Bush administration determined it too dangerous to transfer them home. The duplicitous Yemeni government regularly cuts deals with jihadist groups.

Worse, Yemen, the ancestral home of Osama bin Laden, is current home to the most dangerous al Qaeda affiliate outside of South Asia: al Qaeda in the Arabian Peninsula, aka AQAP.

Regardless, the Obama administration initially planned to transfer most of the Yemenis to their homeland. That was not realistic.

In January 2009, the month of the executive order, AQAP debuted in a threatening video. In February 2009, the Saudi government released a list of 85 wanted terrorists.

Eleven were former Guantanamo detainees transferred by the Bush administration to Saudi Arabia. All 11 joined AQAP, several assuming leadership positions. On Christmas Day 2009, a would-be suicide bomber trained by AQAP tried to blow up a Detroit-bound airliner.

The Obama administration repatriated several Yemenis before Christmas 2009, but additional transfers were put on hold afterward. It turns out that the Bush administration, which made many mistakes of its own, got that one right.

Meanwhile, an increasing number of detainees transferred to other nations were rejoining the fight. In January 2009, a Defense Department spokesman had the number of "confirmed" or "suspected" Guantanamo recidivists at 61.

By the beginning of 2010, that figure rose to more than 100. By December 2010, the number climbed to 150 -- more than double the estimate when Obama first took office.

This created a big problem for the administration, which cannot close Guantanamo without transferring most remaining detainees to other countries. Indeed, Obama's task force approved for transfer roughly 65 percent of detainees held in January 2009. But as the number of recidivists has climbed, the danger of transfers has become more obvious.

The overwhelming majority of the 150 recidivists were transferred during the Bush years. At least five, however, were transferred by the Obama administration.

This is noteworthy because Obama and his advisers have claimed that their supposedly improved transfer process mitigated the risks of transfers. That is not true, and the number of recidivists transferred by Obama will only increase over time.

Consider one disturbing example. In December 2009, the administration repatriated Abdul Hafiz, an Afghan implicated in the murder of a Red Cross worker. Within months, U.S. intelligence learned that Hafiz had rejoined the Taliban. He currently leads efforts to kidnap and kill charity workers.

All of this makes it more difficult for the administration to justify additional transfers.

They have run into other problems as well. The administration wanted to try some detainees, including Sept. 11 mastermind Khalid Sheikh Mohammed, in U.S. courts. That has proven politically untenable.

The American people simply do not want terrorists brought to U.S. soil. Similarly, the plan to house dozens of detainees in a federal prison has met stiff resistance.

Obama has been mugged by reality, with respect to closing Guantanamo.

Thomas Joscelyn is a senior fellow at the Foundation for Defense of Democracies. This article is excerpted from the Encounter Broadside series.