Behind the scenes, Pakistan’s military helped revive talks with India