Now that Mr. Trump has weighed in, it is unclear how the Army will proceed, Defense Department officials said on Sunday. One official said the expectation was that the Army’s case would continue, but added that the president’s tweet put the military in uncharted territory.

The Army has yet to schedule a formal hearing on the murder charge; officials said it was within Mr. Trump’s power to pardon Major Golsteyn even before the case makes its way through the military court system.

In an interview, Major Golsteyn’s lawyer, Phillip Stackhouse, called the Army’s decision to charge his client with murder a case of “political correctness,” and said he was happy that Mr. Trump was going to look into it. “Hopefully Secretary Mattis will as well,” he added, referring to Defense Secretary Jim Mattis.

Major Golsteyn was in Afghanistan in 2010 during the battle for the city of Marja in the volatile Helmand Province. The battle was huge — more than 15,000 American, Afghan, British, Canadian, Danish and Estonian troops assaulted the Taliban stronghold. Over the next several months, dozens of Americans were killed and hundreds were wounded.

In February of that year, a roadside bomb killed two Marines — Sgt. Jeremy R. McQueary and Lance Cpl. Larry M. Johnson — who had been working with Major Golsteyn’s Green Beret team.

There are conflicting accounts of what happened next. Army documents, which claim to recount what Major Golsteyn told the C.I.A., suggest that he and his team began clearing homes nearby, looking for the source of the roadside bomb, and eventually finding explosive materials similar to those used in the bomb that killed the Marines. The team took the suspected bomb maker back to its base, where the Afghan ran into a tribal leader, who identified him as a member of the Taliban.

The tribal leader became frightened that the suspected bomb maker, if released, would report him to the Taliban and he would be killed, the Army documents say.