Other events outside Afghanistan, especially in the Soviet Union, contributed to the eventual agreement.
Conveniently, a formula was readily available for minimizing the humiliation of reversing a policy in which enormous political, material, and human capital had been invested.