Following the defeat of Nazi Germany in World War II, the Soviet Union engineered the installation of friendly Communist governments in most of the countries occupied by Soviet military forces at the end of the War, including Poland, Hungary, Czechoslovakia, Bulgaria, Romania, and the GDR, which together with Albania formed the Comecon in 1949 , and later a military alliance, the Warsaw Pact .