Stalin cooperated with German Nazi leader Adolf Hitler. However, Hitler hated communism. After invading and neutralising France, Germany attacked the Soviet Union. After the Operation Barbarossa invasion, the USSR began working with the Western Allies to defeat Germany. In the end, Germany lost, but the USSR had more casualties than any other country during the war.