SAN DIEGO — A judge on Friday ruled that the arrest of 16 Marines earlier this year in front of their battalion was unlawful and a violation of their rights. 

The 16 Marines are accused of helping smuggle migrants into the United States. 

Bethany Patyon-O’Brien military defense attorney for one of the Marines arrested on Friday said it was a huge victory for her client, but it remains unclear what the judge's ruling means for the charges related to the arrest.

RELATED: Video surfaces of Marines being arrested on Camp Pendleton

RELATED: Marines from Camp Pendleton charged with human smuggling

Last week, video of the arrest surfaced in which the 16 Marines were standing in front of their battalion when a sergeant major motioned to law enforcement to come arrest them. 

The clips are part of a 15-minute video Patyon-O’Brien made available to News 8. 

At the time of the their arrest, Retired Marine Lt. Col. Gary Barthel said it was "kind of black eye for the Marine Corps" and said it was important the military show criminal behavior will not be tolerated. 

Patyon-O’Brien had filed a pre-trial motion for unlawful command influence based on the battalion formation arrest. She said the arrest was a humiliation that took place right in front of the Camp Pendleton front gates.

“The public humiliation of my client and others in the case was wrong. It was illegal and the Marine Corp’s attempt to try to influence the outcome of this case and poison the jury pool,” said Patyon-O’Brien.