Judge advocate general is the officer in charge of legal matters in the United States Army, Navy, or Air Force. This officer holds the rank of major general in the Air Force or Army, and the rank of rear admiral in the Navy. Each judge advocate general serves as legal adviser to the chief of staff of the individual service and, in some cases, to the secretary of the Department of Defense. Their offices provide legal services of all types to the military community. These services include prosecuting, defending, and reviewing courts-martial and offering legal assistance. Other services include working with officials of the local civilian community on matters of common legal interest.