Between World War I and World War II (1918–1940), Riga and Latvia shifted their focus from Russia to the countries of Western Europe. The United Kingdom and Germany replaced Russia as Latvia's major trade partners. The majority of the Baltic Germans were resettled in late 1939, prior to the occupation of Estonia and Latvia by the Soviet Union in June 1940.