ISLAMABAD, Pakistan  As Pakistani soldiers fought their way into the forbidding heartland of the Mehsud tribal territory on Tuesday against Taliban and Al Qaeda militants, they faced the most ferocious fighters in Pakistan, men whose ancestors were legendary for never succumbing to the British.

A British governor of Waziristan, Sir Olaf Caroe, once wrote that the Mehsud tribesmen were the toughest opponents because, like wolves, they hunted and fought in packs.

On the fourth day of their offensive, the Pakistani soldiers continued to meet heavy resistance, particularly around the peaks of Kotkai, the hometown of the leader of the Pakistani Taliban, Hakimullah Mehsud. Seven soldiers were killed when militants attacked a checkpoint there, an intelligence official from the area said.

One thing was working in the army’s favor, however. In the time-honored tradition of the mercurial relationships in the tribal areas, the military has sealed alliances with two Taliban commanders of the Waziri tribe, winning deals that they would not attack the army on their southern and eastern flanks.