During both the Portuguese Colonial War and the Angolan Civil War, the MPLA received military and humanitarian support primarily from the governments of Algeria, the Bulgarian People's Republic, East Germany, Cape Verde Islands, Czechoslovak Socialist Republic, the Congo, Cuba, Guinea-Bissau, Morocco, the Mozambican People's Republic, Nigeria, North Korea, the Polish People's Republic, China, the Romanian Socialist Republic, São Tomé and Príncipe, Somalia, the Soviet Union, Sudan, Tanzania, Libya and SFR Yugoslavia. While China did briefly support the MPLA, it also actively supported the MPLA's enemies, the FNLA and later UNITA, during the war for independence and the civil war. The switch was the result of tensions between China and the Soviet Union for dominance of the communist bloc, which almost led to war.