Unidentified gunmen have killed 16 soldiers in an attack on a military camp in western Niger, local residents and security sources said on Tuesday.