 Around the same time, the Third Reich allied with the Empire of Japan, a rival of the USSR in the Far East and an open enemy of the USSR in the Soviet–Japanese Border Wars in 1938–39.In August 1939, the Soviet government decided to improve relations with Germany by concluding the Molotov–Ribbentrop Pact, pledging non-aggression between the two countries and dividing Eastern Europe into their respective spheres of influence.When Germany launched the Invasion of Poland, the Soviets followed weeks later with their own invasion of the country, claiming the eastern half of Poland while avoiding war with the Allied Powers.