Pakistan is in the grips of militancy because of its fraught relationship with India, with which it has fought three wars and innumerable skirmishes since the countries separated in 1947. Militants were cultivated as an equalizer, to make Pakistan safer against a much larger foe. But they have done the opposite, killing Pakistanis at home and increasing the likelihood of catastrophic conflicts abroad.