In the course of Operation Barbarossa, Nazi Germany invaded Estonia in July–December 1941, and occupied the country until 1944. Estonia had gained independence in 1918 from the then-warring German and Russian Empires. However, in the wake of the August 1939 Nazi-Soviet Pact, the Soviet Union had invaded and occupied Estonia in June 1940, and the country was formally annexed into the USSR in August 1940.

In the summer of 1941, the German troops were at first seen by most Estonians as liberators from Soviet terror, since the Germans arrived only a week after the mass deportation of tens of thousands of people from Estonia and other Baltic states. Despite high hopes for Estonian independence, the people soon realized that the Germans were just a different occupying power.

The German authorities exploited occupied Estonia for their war effort, and in 1941–1944 murdered tens of thousands of people (including indigenous ethnic Estonians, local Estonian Jews, Estonia's Romani people, Russians, Soviet prisoners of war, Jews from other countries, and others). For the duration of the occupation, Estonia was incorporated as Generalbezirk Estland, subordinated to the Reichskommissariat Ostland, an administrative subdivision of the German Reich.

Military occupation Nazi Germany invaded the Soviet Union on June 22, 1941. Three days later, on June 25, Finland declared herself to once again be at war with the USSR, starting the Continuation War. On July 3, Joseph Stalin made a public statement over the radio calling for scorched-earth policy in areas to be abandoned. Because the northernmost areas of the Baltic states were the last to be reached by the Germans, it was here that the Soviet destruction battalions had their most extreme effects. The Estonian Forest Brothers, numbering about 50,000, inflicted heavy casualties on the remaining Soviets; as many as 4,800 were killed and 14,000 captured.

Even though the Germans did not cross the southern Estonian border until July 7–9, many Estonian deserters from Soviet units opened fire on the Red Army as early as June 22. On that day, a group of Forest Brothers attacked Soviet trucks in the district of Harju.Chris Bellamy. The Absolute War. Soviet Russia in the Second World War, p. 197. Vintage Books, New York 2008. The Soviet 22nd Rifle Corps lost the most men, as a large group of Estonian soldiers and officers deserted from it. Furthermore, the border guards of Soviet Estonia mostly had fought for an independent Estonia, and they also escaped to the forests, becoming some of the best Estonian fighters. Estonian writer Juhan Jaik wrote in 1941: "These days bogs and forests are more populated than farms and fields. The forests and bogs are our territory while the fields and farms are occupied by the enemy [i.e., the Soviets]".

The 8th Army (Major General Ljubovtsev), retreated in front of the 2nd corps of the German Army behind the Pärnu River to Emajõgi river line on July 12. As German troops approached Tartu on July 10 and prepared for another battle with the Soviets, they realized that Estonian partisans were already fighting the Soviet troops. The Wehrmacht stopped its advance and hung back, leaving the Estonians to do the fighting. The battle of Tartu lasted two weeks, and destroyed most of the city. Under the leadership of Friedrich Kurg, the Estonian partisans drove the Soviets from Tartu on their own. In the meanwhile, the Soviets had been murdering citizens held in Tartu Prison, killing 192 before the Estonians captured the city.

At the end of July the Germans resumed their advance in Estonia, working with the Estonian Forest Brothers. Both German troops and Estonian partisans took Narva on August 17 and the Estonian capital Tallinn on August 28. On that day, the Soviet flag shot down earlier on Pikk Hermann was replaced with the flag of Estonia by Fred Ise. After the Soviets were driven from Estonia, German troops disarmed all partisan groups. The Estonian flag was soon replaced with the German one, and the 2,000 Estonian soldiers who took part in the parade in Tartu on July 29, were disbanded.Chris Bellamy. The Absolute War. Soviet Russia in the Second World War, p. 198. Vintage Books, New York 2008.

Most Estonians greeted the Germans with relatively open arms and hoped for the restoration of independence. Estonia set up an administration, led by Jüri Uluots as soon as the Soviet regime retreated and before German troops arrived. Estonian partisans that drove the Red Army from Tartu made it possible. That all was for nothing since the Germans had made their plans as set out in Generalplan Ost,Buttar, 2013 p. 54 they disbanded the provisional government and the territory of Estonia was organized as Generalbezirk Estland, subordinated to the Reichskommissariat Ostland, an administrative subdivision of Nazi Germany. A Sicherheitspolizei was established for internal security under the leadership of Ain-Ervin Mere.

In April 1941, on the eve on the German invasion, Alfred Rosenberg, Reich minister for the Occupied Eastern territories, a Baltic German, born and raised in Tallinn, Estonia, laid out his plans for the East. According to Rosenberg a future policy was created:

Germanization (Eindeutschung) of the "racially suitable" elements. Colonization by Germanic people. Exile, deportations of undesirable elements.

Rosenberg felt that the "Estonians were the most Germanic out of the people living in the Baltic area, having already reached 50 percent of Germanization through Danish, Swedish and German influence". Non-suitable Estonians were to be moved to a region that Rosenberg called "Peipusland" to make room for German colonists. The removal of 50% of Estonians was in accordance with the Nazi Generalplan Ost.Buttar, 2013 p. 54

The initial enthusiasm that accompanied the liberation from Soviet occupation quickly waned as a result and the Germans had limited success in recruiting volunteers. The draft was introduced in 1942, resulting in some 3400 men fleeing to Finland to fight in the Finnish Army rather than join the Germans. Finnish Infantry Regiment 200 (Estonian: soomepoisid 'boys of Finland') was formed out of Estonian volunteers in Finland.

With the Allied victory over Germany becoming certain in 1944, the only option to save Estonia's independence was to stave off a new Soviet invasion of Estonia until Germany's capitulation.

Political resistance

In June 1942 political leaders of Estonia who had survived Soviet repressions held a hidden meeting from the occupying powers in Estonia where the formation of an underground Estonian government and the options for preserving continuity of the republic were discussed.Chronology at the EIHC

On January 6, 1943 a meeting was held at the Estonian foreign delegation in Stockholm. It was decided that, in order to preserve the legal continuity of the Republic of Estonia, the last constitutional prime minister, Jüri Uluots, must continue to fulfill his responsibilities as prime minister.Mälksoo, Lauri (2000). Professor Uluots, the Estonian Government in Exile and the Continuity of the Republic of Estonia in International Law. Nordic Journal of International Law 69.3, 289–316.

In June 1944 the elector's assembly of the Republic of Estonia gathered in secrecy from the occupying powers in Tallinn and appointed Jüri Uluots as the prime minister with the responsibilities of the President. On June 21 Jüri Uluots appointed Otto Tief as deputy prime minister.

As the Germans retreated, on September 18, 1944 Jüri Uluots formed a government led by the Deputy Prime Minister, Otto Tief. On September 20 the Nazi German flag on Pikk Hermann was replaced with the tricolor flag of Estonia. On September 22 the Red Army took Tallinn and the Estonian flag on Pikk Hermann was replaced with the Soviet flag. The Estonian underground government, not officially recognized by either the Nazi Germany or Soviet Union, fled to Stockholm, Sweden and operated in exile until 1992, when Heinrich Mark, the Prime Minister of the Republic of Estonia in duties of the President in exile, presented his credentials to the newly elected President of Estonia Lennart Meri. On February 23, 1989 the flag of the Estonian SSR had been lowered on Pikk Hermann; it was replaced with the flag of Estonia to mark Estonian Independence Day on February 24, 1989.

Estonians in German military units When Germany fully occupied Estonia in the summer of 1941, the Germans began recruiting Estonian men into Wehrmacht rear security units, with the majority joining voluntarily, often out of the desire to fight the USSR which had occupied and annexed the country in 1940. Up to March 1942, drafted Estonians mostly served in the security units in the Army Group North Rear area. On August 28, 1942 the German powers announced the legal compilation of the so-called "Estonian Legion" within the Waffen SS.Caballero Jurado, Carlos; Nigel Thomas; Darko Pavlović (2002). Germany's Eastern Front Allies (2): Baltic Forces. Oxford: Osprey Publishing. p. 14. Oberführer Franz Augsberger was nominated the commander of the legion. Up to the end of 1942 about 1,280 men volunteered into the training camp. Bataillon Narwa was formed from the first 800 men of the Legion to have finished their training at Heidelager, being sent in April 1943 to join the Division Wiking in Ukraine. They replaced the Finnish Volunteer Battalion, recalled to Finland for political reasons.Estonian Vikings: Estnisches SS-Freiwilligen Bataillon Narwa and Subsequent Units, Eastern Front, 1943–1944. In March 1943, a partial mobilization was carried out in Estonia during which 12,000 men were conscripted into the SS. On May 5, 1943 the 3rd Waffen-SS Brigade (Estonian), another fully Estonian unit, was formed and sent to the front near Nevel.

By January 1944, the front was pushed back by the Red Army almost all the way to the former Estonian border. Jüri Uluots, the last constitutional Prime Minister of the Republic of Estonia, the leader of Estonian underground government delivered a radio address on February 7 that implored all able-bodied men born from 1904 through 1923 to report for military service in the SS (before this, Uluots had opposed any German mobilization of Estonians.) Following Uluots' address, 38.000 conscripts jammed registration centers. Several thousand Estonians who had volunteered to join the Finnish army were transferred back across the Gulf of Finland to join the newly formed Territorial Defense Force, assigned to defend Estonia against the Soviet advance. The maximum number of Estonians enrolled in German military units was 70,000. The initial formation of the volunteer Estonian Legion created in 1942 was eventually expanded to become a full-sized conscript division of the Waffen SS in 1944, the 20th Waffen Grenadier Division of the SS (1st Estonian). Units consisting largely of Estonians – often under German officers – saw action on the Narva line throughout 1944. Many Estonians hoped that they would attract support from the Allies, and ultimately a restoration of their interwar independence, by resisting the Soviet reoccupation of their country.The Baltic States: The National Self-Determination of Estonia, Latvia and Lithuania, Graham Smith, p. 91, .