WARSAW — President Obama defended on Tuesday the prisoner swap that freed an American soldier in Afghanistan and vowed to keep watch over the five Taliban figures released from the American prison camp in Guantánamo Bay, Cuba, in exchange.

Responding to criticism of the trade for the first time, Mr. Obama dismissed questions about whether the freed prisoner, Sgt. Bowe Bergdahl, deserved special efforts, given reports that he deserted his post in combat. And the president said he had opted not to notify Congress in advance as required by law because there was not enough time.

“The United States has always had a pretty sacred rule, and that is: we don’t leave our men or women in uniform behind,” Mr. Obama told reporters in Warsaw during the first stop on his four-day European trip.

Asked about the circumstances of Sergeant Bergdahl’s capture by the Taliban, Mr. Obama said that no one was debriefing him yet and that it did not change the responsibility to try to recover him.

Mr. Obama brushed off accusations that he had violated a law requiring a 30-day advance notice to Congress before releasing prisoners from Guantánamo, saying the urgency of the moment made that impractical.

“We have consulted with Congress for quite some time about the possibility that we might need to execute a prisoner exchange in order to recover Sergeant Bergdahl,” he said. “We saw an opportunity. We were concerned about Sergeant Bergdahl’s health.”

He added, “The process was truncated because we wanted to make sure we did not miss that window.”

The president said the five Taliban figures sent to Qatar in return for Sergeant Bergdahl would be monitored.

Video

Mixed Reaction to the Bergdahl Deal

Prisoner swap or negotiations with terrorists? Questions arise after the freeing of five senior Taliban figures in exchange for the American soldier Sgt. Bowe Bergdahl.

“We will be keeping eyes on them,” he said. “Is there the possibility of some of them trying to return to activities that are detrimental to us? Absolutely. That’s been true of all the prisoners who have been released from Guantánamo. There is a certain recidivism that takes place. I wouldn’t be doing it if I thought it would be contrary to American national security.”

Gen. Martin E. Dempsey, the chairman of the Joint Chiefs of Staff, said the military would determine whether Sergeant Bergdahl had violated rules by leaving his post nearly five years ago. He said the soldier should not be judged until evidence is collected.

“The questions about this particular soldier’s conduct are separate from our effort to recovery ANY U.S. service member in enemy captivity,” General Dempsey wrote on his Facebook page.

An error has occurred. Please try again later.

You are already subscribed to this email.

“This was likely the last, best opportunity to free him,” the general said. “As for the circumstances of his capture, when he is able to provide them, we’ll learn the facts. Like any American, he is innocent until proven guilty. Our Army’s leaders will not look away from misconduct if it occurred. In the meantime, we will continue to care for him and his family.”

General Dempsey’s Facebook post — which the White House uncharacteristically immediately sent around to reporters — is the strongest indication yet that the Defense Department may pursue some sort of punitive action against Sergeant Bergdahl. But the Pentagon has swung back and forth on the issue since the sergeant’s release on Saturday, first saying that whatever his crime, five years as a prisoner in Afghanistan was punishment enough, then saying that officials were unsure what they would do, then returning to the “five years is punishment enough,” line, as a senior defense official said on Monday.

In an interview with the Associated Press on Tuesday, General Dempsey also said that Sergeant Bergdahl’s next promotion to staff sergeant, which was set to happen soon, is no longer automatic because the sergeant isn’t missing in action any longer.

The decision by the White House to draw notice to General Dempsey’s Facebook post was an indication of the huge political pressure Mr. Obama has been under since his decision to swap the detainees for Sergeant Bergdahl, one administration official said.

The administration argued that it had not violated the law by failing to provide the notice to Congress. Mr. Obama has in the past objected to that provision because of what he called its unconstitutional infringement on the power of the executive.

Caitlin Hayden, a spokeswoman for the White House National Security Council, said Defense Secretary Chuck Hagel had approved the prisoner swap and had agreed that the 30-day notice should not apply in this instance.

“The administration determined that the notification requirement should be construed not to apply to this unique set of circumstances,” Ms. Hayden said, because Mr. Hagel “determined that providing notice as specified in the statute could endanger the soldier’s life.”

Ms. Hayden added that the law in this case would “interfere with the executive’s performance” of functions assigned by the Constitution, namely protecting American lives abroad and protecting American soldiers. “We believe it is fair to conclude that Congress did not intend that the administration would be barred from taking the action it did in these circumstances,” she said.