A Junior Commissioned Officer (JCO) of the Indian Army was martyred in an encounter with terrorists along the Line of Control (LoC) in Jammu and Kashmir's Akhnoor sector, the Army said on Saturday, adding an infiltration attempt by terrorists was foiled.