The Soviet occupation of Latvia in 1940 refers, according to the European Court of Human Rights, the Government of Latvia, the United States Department of State, and the European Union, to the military occupation of the Republic of Latvia by the Soviet Union ostensibly under the provisions of the 1939 Molotov–Ribbentrop Pact with Nazi Germany.
When World War II started in September 1939 with the German invasion of Poland, Latvia had already come under the Soviet sphere of influence in the Molotov–Ribbentrop Pact and its of August 1939.
In the reassessment period of the Soviet history that began during the Perestroika, the USSR in 1989 condemned the 1939 secret protocol between Nazi Germany and herself that had led to the invasion and occupation of the three Baltic countries, including Latvia. While Russia acknowledged in a treaty with Lithuania the adverse impact by the USSR on Lithuania's sovereignty prior to the dissolution of the Soviet Union, no such acknowledgement by Russia exists with regard to Estonia or Latvia, and the central authorities of the USSR did not acknowledge occupation prior to its dissolution.
In July 1989 the country stepped on the road of the restoration of its independence, and after the dissolution of the Soviet Union, Latvia's sovereignty was fully restored in 1991. On August 22, 1996, the Latvian parliament adopted a declaration which stated that the Soviet occupation of Latvia in 1940 was a military occupation and an illegal incorporation.
In the aftermath of the Russian Revolution of 1917, Latvia declared its independence on November 18, 1918. After a prolonged War of Independence, Latvia and Soviet Russia (the predecessor of the Soviet Union) signed a peace treaty on August 11, 1920. In its Article 2 Soviet Russia "unreservedly recognises the independence and sovereignty of the Latvian State and voluntarily and forever renounces all sovereign rights (...) to the Latvian people and territory." The independence of Latvia was diplomatically recognised by the Allied Supreme Council (France, Great Britain, Italy, Japan, Belgium) on January 26, 1921. Other states followed the suit. On September 22, 1921 Latvia was admitted to membership in the League of Nations and remained a member until the formal dissolution of the League in 1946. On February 5, 1932, a Non-Aggression Treaty with the Soviet Union was signed, based on the August 11, 1920 treaty whose basic agreements inalterably and for all time form the firm basis of the relationship of the two states. On June 7, 1939 German–Latvian Non-Aggression Pact was signed. On September 1, 1939, the day World War II began, Latvia declared its neutrality.