After existing as independent countries for twenty years, the Baltic states were occupied and illegally annexed in June 1940. Given a free hand by Nazi Germany via the German–Soviet Nonaggression Pact and its secret additional protocol of August 1939, the Soviet Union pressured the three countries to accept its military bases in September 1939. In the case of refusal, the USSR effected an air and naval blockade and threatened to attack immediately with hundreds of thousands of troops massed upon the border. The military forces overtook the political systems of these countries and installed puppet regimes after rigged elections in June 1940.