Pakistan's foreign policy from 1947-1953 (Phase I) focused on non-alignment and developing relations with other newly independent states and the US. From 1954-1962 (Phase II), Pakistan shifted from non-alignment to aligning with Western countries against the threat of communism by joining security pacts like SEATO and CENTO. However, this alignment compromised Pakistan's independent foreign policy and alienated countries like the Soviet Union, Egypt and excluded it from the Non-Aligned Movement.