What are the effects of strategic surprise on foreign policy? We apply mechanisms from cognitive psychology and foreign policy analysis - the hindsight bias and policy engagement - to theorize about how political leaders attribute blame for strategic surprises and the consequences for their foreign policies. We argue that leaders who are hardly engaged with policy matters related to a surprise will tend to believe that it should have been foreseen, attribute blame to domestic culprits and favour significant changes in foreign policy. Conversely, those more involved with policy planning will blame an adversary's deception and resist policy change. We illustrate these hypotheses empirically by examining the cases of the Truman administration's reaction to the 1949 Soviet nuclear test and the Johnson administration's reaction to the 1967 Chinese thermonuclear explosion. Despite their similar international and domestic political environments, the two presidents reacted quite differently to the two surprises. Truman, who was weakly engaged with nuclear matters prior to 1949, authorized major policy changes and reorganized the Central Intelligence Agency. Conversely, Johnson's deeper involvement in nuclear matters led him to attribute blame for the surprise to Chinese deception. He sought to use the 1967 test to advance his ongoing efforts to secure the nuclear non-proliferation treaty. The findings suggest that the variables of policy engagement and the hindsight bias can predict how leaders' foreign policies will respond to surprises regarding nuclear weapons proliferation and potentially other shifts in the balance of power.