Pakistani authorities say an unknown gunman has killed three foreign militants in a semi-autonomous tribal region bordering Afghanistan .