10 USC 5946 - Precedence accorded commanding officers

The commanding officer of a vessel or of a naval station takes precedence over all officers under his command.