18. (1) Where an officer or a seaman of the Navy is attached to, or is a member of any part of the Navy acting with, any military or air force of Sri Lanka under such conditions as may be prescribed, then, for the purposes of command and discipline, the officers and the non-commissioned officers (not below the rank of Sergeant) of such force shall, in relation to him, be treated as, and have all the powers (other than powers of punishment) vested in, officers or petty officers of the Navy, as the case may be.
(2) Where an officer or a non-commissioned officer (not below the rank of Sergeant) of the Army or Air Force of Sri Lanka is attached to, or is a member of any military or air force of Sri Lanka which is acting with, any part of the Navy under such conditions as may be prescribed, then, for the purposes of command and discipline, he shall, in relation to that part of the Navy, be treated as, and have all the powers (other than the powers of punishment) vested in, an officer or a petty officer of the Navy, as the case may be. *Relations between naval, military, and air forces of Sri Lanka acting together.*