Michael B. Mukasey was U.S. attorney general from 2007 to 2009.

The seeds of what blossomed grotesquely in the Rose Garden last weekend — a celebration of the release of five senior Taliban military leaders in exchange for a U.S. sergeant purported to be a deserter — were sown a long time ago: on the second and third days of President Obama’s first term, to be precise.

On his second day in office, the president signed an executive order directing that the Guantanamo Bay detention facility be closed. You can watch the cringe-inducing video of the signing ceremony on YouTube, as the president stumbles through a reading of the order to close the facility “consistent with the national security and foreign policy interests of the United States and the interests of justice,” signs with a flourish, and asks then-White House counsel Greg Craig, whether there is a separate executive order describing what is to be done with the Guantanamo detainees; Craig is heard to reply off camera that “a process” will be set up, whereupon the president repeats solemnly into the camera that “a process” will be set up.

The following day, the president met with congressional leaders to discuss his economic stimulus. When Republican House whip Eric Cantor offered some suggestions, the president reminded him and others of the vanquished who were present that “elections have consequences” and “I won.”

The president apparently hadn’t thought through how he would accomplish the goal and serve the interests he had announced. But he had indeed won.

In exchange for the release of U.S. Army Sgt. Bowe Bergdahl, the U.S. agreed to free five Taliban commanders from the military detention center at Guantanamo Bay, Cuba. They were among the Taliban’s most influential commanders. (Tom LeGro and Natalie Jennings/The Washington Post)

Fast forward, and characteristically the Obama administration has apologized only for the least of the president’s transgressions in this sorry affair: his failure to consult Congress 30 days in advance of freeing any Guantanamo detainees, as required by the National Defense Authorization Act. At the time the president signed that law he issued an accompanying signing statement taking the position, I believe probably correctly, that the law is unconstitutional as a restriction on his Article II executive powers. However, his own criticism of his predecessor for alleged misuse of executive authority apparently left him diffident about relying on that, so he relied instead on two excuses with neither legal nor factual basis: concern for the rapid deterioration of Sgt. Bowe Bergdahl’s health, which does not explain why no notice was given; and simple neglect due to the rush of events, which contradicts the first.

It is difficult to believe that the president actually understood last weekend the enormity of what he had done. All the details of how Bergdahl left his unit may have to be teased out in the setting of a court martial, but it has long been known that he was a malcontent who had sent his belongings home well before the day in June 2009 when he left his unit in Afghanistan, that he wrote that the army he served in was a “joke” and that he was ashamed to be an American. Was the president perhaps not aware that desertion is an act viewed with such seriousness under the Uniform Code of Military Justice that in wartime it can carry the death penalty?

Every one of the five detainees released from Guantanamo, as reported by Tom Joscelyn in The Weekly Standard, is not only a senior Taliban official, but also someone who has trained with and coordinated fighting with al-Qaeda before 9/11. Which is to say, at precisely the time when his administration is trying to withdraw troops from Afghanistan in a way that at least will not threaten the safety of those who remain behind until the end of 2016, if not beyond, the president has provided skilled strategic planners to the Taliban; at the time when it is the administration’s announced intention to separate the Taliban from al-Qaeda, the president has provided the Taliban with military leaders who have a history of close ties with al-Qaeda.

Was he aware of that when he presided over a Rose Garden celebration?

In one respect, however, the freeing of these five with the retrieval of Bergdahl as a cover makes the goal the president announced on his second day in office easier to achieve, although it is hard to think that he would have been so cynical as to have consummated this ghastly transaction with such a thing in mind. Because these five are by far the worst Taliban detainees housed at Guantanamo, the freeing of the remainder could be seen as a trifle in comparison.

What can be done about all of this? I think not much.

One of the “consequences” that elections have is that there are now available only three ways to deal with executive misuse of its actual authority. One is the power of the purse. However, there is no expenditure that Congress could deny or undo that would undo the damage that has been wrought.

PostTV and Dan Lamothe of The Washington Post’s new Checkpoint blog point out key moments in the video released by the Taliban showing Sgt. Bowe Bergdahl's recovery. (Dan Lamothe and Sarah Parnass/The Washington Post)

The second – closely related to the power of the purse – is the oversight authority to look into how government resources are being used and whether legislation is necessary. Congressional hearings ordinarily might be expected to have at least the benign effect of embarrassment, but that presupposes the capacity for embarrassment.

The third is impeachment, which cannot be seriously undertaken absent a national consensus for it, and none seems now to exist.

It looks like all that is left is providence. It’s long been said, although by whom is uncertain, that God protects drunkards, little children and the United States of America. Let’s pray that whoever said it was right.