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.

“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.