Pakistan , a key ally in the U.S.-led war on terrorism , has been battling militants in the tribal areas , but is wary of allowing foreign troops to operate on its soil out of fear of a backlash from fiercely-independent ethnic Pashtun tribes .