Col. Steven Folsom dismissed charges against Lt. Col. Jeffrey Chessani after finding that a four-star general overseeing the case was improperly influenced by an investigator probing the November 2005 shootings by a Marine squad in Haditha.
"Unlawful command influence is the mortal enemy of military justice," Folsom said. "In order to restore the public confidence, we need to take it back. We need to turn the clock back."
Chessani, of Rangely, Colo., was the highest-ranking officer to face a combat-related court-martial since the Vietnam War.
The charges were dismissed without prejudice, meaning they can be refiled, but Folsom barred Marine Forces Central Command from future involvement in the case.
Of eight Marines originally charged in the case, only one is still facing prosecution in the biggest U.S. criminal prosecution involving Iraqi deaths to come out of the war.
The incident occurred after a Marine was killed by a roadside bomb.
Staff Sgt. Frank Wuterich, who faces voluntary manslaughter charges, and a squad member shot five men by a car at the scene. Investigators say Wuterich then ordered his men to clear several houses with grenades and gunfire, leaving women and children among the dead.
Folsom's ruling comes two weeks after Gen. James Mattis took the stand a rare courtroom appearance for such a high-ranking officer
to address the judge's initial finding that there was evidence of unlawful command influence in the case.
Col. John Ewers, the military lawyer who investigated the killings and took Chessani's statement, later became a top legal adviser to Mattis and sat in on briefings that helped Mattis decide who would be charged.
Mattis testified he never talked with Ewers about Haditha, although Ewers was present during a number of legal meetings where Haditha and Chessani were discussed.
Military policy prohibits Ewers from offering legal advice because he also was an investigator in the case.
Mattis approved the filing of charges against Chessani when he was both commander of the Marine Corps Forces Central Command and the commander of the 1st Marine Expeditionary Force at Camp Pendleton. He has since been promoted and serves as commander of both NATO's Supreme Allied Commander Transformation and commander of U.S. Joint Forces.
Four enlisted Marines were originally charged with counts related to the killings and four officers were charged in connection with the investigation, including Chessani.