The order of precedence when displaying military flags together is Army, Marine Corps, Navy, Air Force and Coast Guard. Except that Coast Guard moves up right behind Navy when the Coast Guard serves as a service of the Dept of the Navy in time of war. The basic citation is Department of Defense Directive 1005.8.