The countries actually made two agreements: the first dealt with economic relations, while the second was a non-aggression pact. The economic agreement, signed on August 19, 1939, called for an exchange of goods worth 200 million reichsmarks. Four days later, Ribbentrop went to Moscow to sign the non-aggression pact. The two countries agreed not to attack each other or help another party attack the other side for a period of 10 years. The pact also included a secret attachment concerning the division of various territories. The Baltic States (Estonia, Lithuania, and Latvia) and Bessarabia were to be part of the Soviet sphere, while Lithuania's claim of Vilna and its surroundings was acknowledged by the Germans. Poland was to be divided between the two countries.
A week after the second agreement was signed, Germany invaded Poland. The Soviet Union took over the eastern part of the country, including western Belorussia and the western Ukraine, while Germany occupied the rest. In 1940 the Soviets annexed the Baltic States, Bessarabia, and northern Bukovina. However, the pact was abruptly broken by the Germans when they invaded the Soviet Union in June 1941.