The Judge Advocate General (JAG) is the senior legal officer in each branch of the military, overseeing all legal matters within that branch. JAG officers serve as both prosecutors and defense attorneys in court-martial cases and provide legal advice to commanders on military justice issues, including investigations, courts-martial, and military policy.

JAG officers are responsible for maintaining the integrity of the military justice system, and they may represent either the prosecution or defense in specific cases depending on their role.