The prime minister knew he had done the right thing for Pakistan and the world, but he was not sure his army would see it that way.