Maj. Kendra Motz said prosecutors were meeting at Marine Corps Camp Pendleton to explore their options, but she did not know what they were considering.
The judge, Marine Col. Stephen Keane, gave prosecutors until Nov. 25 to offer a way to remedy the situation.
When ruling Friday, Marine Col. Stephen Keane agreed with defense attorneys who said the command violated the rights of the defendants when they pulled 16 Marines out of a battalion formation of 800 troops at Camp Pendleton on July 25 and accused them of the crimes in front of their unit.
The unit's leaders called them "a cancer" and "bad Marines," defense attorneys said.
In the end, only 10 of those in the formation were charged with various crimes ranging from the distribution of LSD, stealing smoke grenades to illegally transporting immigrants to help a smuggling operation, according to charge sheets.
Two Marines were arrested near the U.S.-Mexico border after being stopped by the Border Patrol and found to have immigrants in their car, according to court documents. Another service member was arrested, but not during the formation.
Keane said the public display of the arrests amounted to unlawful command influence. That is when commanders use their positions of power to affect a case and compromise the ability to hold a fair trial.
The judge said that if the prosecution cannot remedy the situation, the court would be left with only one option. Defense attorneys for some of the Marines have asked for charges to be dismissed. They say otherwise it will be difficult to find an impartial jury pool.
"I don't know how they can un-ring the bell," said defense attorney Bethany Payton-O'Brien, who is asking that the charges be dismissed against her client, Cpl. Trenton Elliot, 27, citing unlawful command influence.
The Marine Corps filmed the arrests, and part of the video was later obtained by the San Diego Union-Tribune.
A battalion commander and a sergeant major can be heard on the video calling the detained "bad Marines" and "a cancer," Payton-O'Brien said.
"The Marine Corps that day essentially announced to the world that they are guilty," she said. "How do we now go and defend them?"
The Marine Corps said in a statement after the newspaper reported on the video that it was made to document the arrests "in an unbiased, non-editorialized manner."
The video is for official use only and would not be released, Motz said. Prosecutors declined to be interviewed, saying they do not comment on pending cases.
The arrests came after two Marines were stopped by the U.S. Border Patrol about 7 miles (11 kilometers) north of the border on July 3. Three Mexican migrants who came into the country illegally were sitting in the back seat of the black BMW driven by one of the Marines, according to the federal complaint.
The three migrants told authorities that they were from Mexico and had agreed to pay $8,000 to be smuggled into the United States, documents say.
U.S. Border Patrol officials say smuggling rings have been luring U.S. troops, police officers, Border Patrol agents and others to work for them as drivers - a crucial component of moving migrants further into the United States once smugglers get them over the border from Mexico.
None of the Marines are accused of bringing immigrants across the border.
Elliot was charged with the illegal transportation of immigrants within the United States, position of drug paraphernalia, and larceny of a government training pistol and small rounds, Payton-O'Brien said.
He was working out a plea deal with prosecutors when defense lawyers obtained the video. When the motion was filed alleging unlawful command influence, the prosecution withdrew from the agreement, Payton-O'Brien said.
The 13 cases are being handled separately. Experts say lawyers representing the 10 Marines arrested during the battalion formation could use the ruling to argue that their cases should be dismissed.
"Having been a judge, I know courts are not eager to dismiss a case. But the law is the law, and if the judge is unsatisfied with the remedies that result from his warning, then he is going to have little choice than to dismiss the charges," said Gary Solis a former Marine Corps prosecutor and military judge who teaches law at Georgetown University.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.