Relations between Pakistan and Afghanistan, both major U.S. allies in the war on terrorism, have deteriorated sharply over the past year in the wake of the bloodiest campaign mounted by the Taliban since it was ousted from power.