In at least a dozen sexual assault cases since the president’s remarks at the White House in May, judges and defense lawyers have said that Mr. Obama’s words as commander in chief amounted to “unlawful command influence,” tainting trials as a result. Military law experts said that those cases were only the beginning and that the president’s remarks were certain to complicate almost all prosecutions for sexual assault.

“Unlawful command influence” refers to actions of commanders that could be interpreted by jurors as an attempt to influence a court-martial, in effect ordering a specific outcome. Mr. Obama, as commander in chief of the armed forces, is considered the most powerful person to wield such influence.

The president’s remarks might have seemed innocuous to civilians, but military law experts say defense lawyers will seize on the president’s call for an automatic dishonorable discharge, the most severe discharge available in a court-martial, arguing that his words will affect their cases.

“His remarks were more specific than I’ve ever heard a commander in chief get,” said Thomas J. Romig, a former judge advocate general of the Army and the dean of the Washburn University School of Law in Topeka, Kan. “When the commander in chief says they will be dishonorably discharged, that’s a pretty specific message. Every military defense counsel will make a motion about this.”