House Speaker John Boehner (R-Ohio) said Friday that President Barack Obama made a critical tactical error earlier this year by releasing five Taliban detainees from Guantanamo Bay, especially as the threat of the Islamic State continues to grow.

“At a time when we are grappling with the evil terror of the self-proclaimed ‘Islamic State’ in Syria and Iraq – a group whose leader was once an American detainee, before being released – it is difficult to imagine a more potentially serious lapse in judgment by the Obama administration,” Boehner said.

House Speaker John Boehner of Ohio blasted President Barack Obama on Thursday for ignoring Congress and releasing dangerous terrorists. (AP Photo/Will Kincaid)

The Islamic State executed a U.S. photojournalist earlier this week, which prompted Obama to say the U.S. would be “relentless” in pursuing justice.

But it also had the White House backtracking from earlier comments that downplayed the threat the Islamic State poses. That has prompted Republican criticism that Obama should have done more earlier to contain the terrorist group before it was allowed to expand into major regions of Syria and Iraq.

Boehner’s comment was released in response to a Government Accountability Office report that said Obama’s Defense Department broke two laws when it swapped the five Taliban soldiers for Army Sgt. Bowe Bergdahl. GAO said the Defense Department failed to properly notify Congress about its plan to ship the five detainees to Qatar as part of that deal.

Boehner said GAO confirmed this, although he said confirmation was not needed because it was obvious to “everyone capable of reading the English language.” But he said it’s another reminder of Obama’s preference for operating without Congress.

“As news reports continue to suggest that the president is contemplating re-writing the law again, he should take into account the fact that this nonpartisan, independent agency has confirmed he exceeded his authority,” he said.

“Every time the president unilaterally re-writes the law and ignores the Constitution, he does damage to the institutions of our democratic government, and undermines further the bonds of trust between that government and the American people,” Boehner added.