Latvian SSR

The Latvian SSR was a Soviet Republic, and a constituent part of the Soviet Union between 1940 and 1991.
Latvia had broken away from the Russian Empire after the Russian Revolution, (having briefly been a 'Latvian SSR') and remained independent until the Molotov-Ribbentrop Pact. It was annexed by the Soviet Union in 1940, and then occupied by Nazi Germany in 1941. The Latvian SSR was restored in 1944 after Soviet Army assumed control over most of its teritory.
The Latvian SSR, along with the other Baltic Republics was allowed greater autonomy in the late 1980s, and in 1988 the old pre-war Flag of Latvia was allowed to be used, and replaced the Soviet Latvian flag as the official flag in 1990. The Latvian SSR became the independent state of Latvia on August 21, 1991, 4 months before Soviet Union ceased to exist.