Following the Welles Declaration of July 23, 1940, the annexation of Latvia into the Soviet Union (USSR) on 5 August 1940 was not recognized as legitimate by the United States, the European Community, and recognition of it as the nominal fifteenth constituent republic of the USSR was withheld for five decades. Its territory was subsequently conquered by Nazi Germany in June -- July 1941, before being retaken by the Soviets in 1944 -- 1945. Nevertheless, Latvia continued to exist as a de jure independent country with a number of countries continued to recognize Latvian diplomats and consuls who still functioned in the name of their former governments.

When did latvia become part of the soviet union? OK. Let's think. My stream of consciousness:
To answer the question, consider the following: Following the Welles Declaration of July 23, 1940, the annexation of Latvia into the Soviet Union (USSR) on 5 August 1940 was not recognized as legitimate by the United States, the European Community, and recognition of it as the nominal fifteenth constituent republic of the USSR was withheld for five decades. The answer is 5 August 1940.