After the occupation of Latvia on June 17, 1940, national resistance movement organizations gradually formed here, issuing illegal political appeals, sabotaging the orders of the Soviet occupation authorities and preparing for an armed struggle to restore independence of the state. The largest of them were the Latvian National Legion, Guardians of the Fatherland (Tēvijas sargi), Battle Organization for the Liberation of Latvia and others. On May 13, 1941, a campaign organized by in-school youth took place, when about 5,000 anti-Soviet slogans were distributed simultaneously in Riga, Jelgava, Cēsis, Bauska and other towns. As a consequence of the lack of experience in illegal activities and the effectiveness of the methods used by the Soviet security institutions, most of the resistance movement activists were arrested and sentenced to death or imprisoned for several years in the USSR Gulag camps, where only a few were able to return from.
The rejection of Latvia's incorporation in the Soviet Union by the community was also demonstrated as the national partisan movement that began on June 22, 1941, after the war between Germany and the USSR started. National partisans turned against Soviet armed formations and tried to delay the evacuation of local people and material assets to the USSR in the vicinity of Smiltene, Gulbene, Madona, Alūksne, Limbaži, Tērvete and elsewhere. Former Latvian army officers and soldiers, volunteer paramilitary organization Aizsargi members, as well as soldiers who had retired or deserted from the 24th Territorial Corps (Soviet army unit established in occupied Latvia) managed to take control over several settlements and seize power in five suburbs of Riga, six county centres, 13 small towns and many parishes before the arrival of German troops. Several thousand people participated in the partisan war, of whom 270 fighters fell, while destroying about 800 and taking prisoners about 1,500 Red Army soldiers.
During the occupation of Nazi Germany, the Latvian Central Council, secretly established on August 13, 1943, in Riga, consisting of representatives of the largest pre-war political parties led by Konstantīns Čakste, attempted to become the political centre of the resistance movement. The LCP advocated the restoration of a democratic Republic of Latvia based on the 1922 Constitution, drew up several memoranda for Western governments, and maintained contacts with resistance movements in other Baltic states. During the summer and autumn of 1944, as one occupying power replaced another, the LCP was unable to implement its plans to form a government and organize a military uprising. After the arrest of the main forces of General Jānis Kurelis group on November 14, 1944, soldiers of Lieutenant Roberts Rubenis battalion showed armed resistance to the Nazis until December 9 in the battles near Renda and Zlēkas in Kurzeme.
In the autumn of 1944, armed resistance movement against the repeated occupation by the USSR began in Latvia. People who wanted to regain Latvia's independence or escape Soviet repressions became national partisans. Significant national partisan battles took place on March 2–3, 1945 in the Stompaku swamp in Latgale, on January 1, 1946, near Āpuznieki in Kurzeme and in several other places. National partisans occupied and temporarily paralyzed at least 40 Latvian parish centres. During clashes or from hiding, 370 officers and soldiers of the KGB troops, 735 depopulators, as well as 1,070 collaborators of the communist regime were killed. In the partisan movement in Latvia until 1956/1957, 12,000–13,000 people took part, of whom 2,407 died or committed suicide, while 5,489 people were arrested by the KGB.
In the 1960s and 1970s, a dissident movement incompatible with the Soviet regime developed in the USSR, advocating universal respect for human rights and the introduction of greater democratic freedoms. The ideas of defending human rights, initiated with the signing of the Helsinki Act in 1975, played an important role. They paved the way for the collapse of the communist system and the fall of the Iron Curtain. The most famous Latvian dissidents and political prisoners, Gunārs Astra, Ints Cālītis, Lidija Doroņina-Lasmane, Knuts Skujenieks, obtained and propagated banned foreign literature and the works of other Soviet dissidents, expressed the truth about the history of Latvia and protested against its occupation. In 1983, many of them were repeatedly arrested and imprisoned in penal camps, while others were warned and subjected to surveillance.
Even during the years of stagnation, the bravest patriots continued to express the people's aspirations for self-determination - they distributed proclamations of national content, preserved and popularized books published in pre-war Latvia and other Latvian cultural values. Protesting against the existing regime, people tore down or damaged the flags of the USSR and the Latvian SSR, anti-Soviet inscriptions appeared in various places, young people refused to serve in the Soviet army. Many listened to the Latvian-language programmes of “Voice of America”, “Free Europe” and other Western broadcasts. Candle-laying at the monument to the President of Latvia Jānis Čakste on Memorial Day at the Riga Forest Cemetery (Meža kapi) and elsewhere became increasingly widespread. From 1959 to 1986, Soviet security institutions repressed at least 216 participants of the resistance movement, but the number of opponents to the occupation authorities was obviously much higher.
Having been part of the USSR for several decades, Latvians adapted to the imposed Soviet ideology but retained their national identity and yearning for freedom. In the second half of the 1980s, the crisis of the communist regime in Latvia was marked by the activities of various informal organizations and groups not connected with the structures of Soviet power. The human rights group “Helsinki 86”, established in 1986, was able to become a charger of the national resistance. The laying of flowers at the Freedom Monument on June 14, 1987, and the march holding the Latvian red-white-and-red national flag from the Freedom Monument to the Brothers’ Cemetery carried out a year later by Konstantīns Pupurs practically and symbolically demonstrated the growth of the resistance movement into the awakening of the entire nation and ended up with the restoration of Latvian state independence in 1990–1991.