Before the Soviet invasion, Afghanistan pursued a policy of neutrality and nonalignment rein its foreign relations, being one of a few independent nations to stay neutral in both World War I and World War II. In international forums, Afghanistan generally followed the voting patterns of Asian and African non-aligned countries. During the 1950s and 1960s, Afghanistan was able to use the Russian and American need for allies during the Cold War as a way to receive economic assistance from both countries. However, given that unlike Russia, America refused to give extensive military aid to the country, the government of Daoud Khan developed warmer ties with the USSR while officially remaining non-aligned. Following the coup of April 1978, the government under Nur Muhammad Taraki developed significantly closer ties with the Soviet Union and its communist satellites.