In mid-1938 Nazi Germany took over Czechoslovakia and split off Slovakia. After World War II the USSR annexed a part of eastern Czechoslovakia so that they could have a border with Hungary. The USSR also annexed parts of Poland and Romania. All four of these countries were in the USSR's sphere of influence. The USSR thought that this meant they could make sure the countries did what they wanted. In 1968 the USSR thought that the government of Alexander Dubcek was moving away from communism and leaving the Warsaw Pact, and invaded Czechoslovakia.