The Soviet Union and Nazi Germany were ideological enemies. Despite this, the Soviet Union and Nazi Germany entered into a non-aggression pact in the summer of 1939, which allowed them to invade and occupy parts of Poland. This pact suited both countries territorial aims.