The Estonians settled in their present territory before the Christian era. They were mentioned (1st cent. A.D.) by Tacitus, who called them Aesti. In the 13th cent. the Danes and the German order of the Livonian Brothers of the Sword formed an alliance to conquer the pagan Estonian tribes. The Danes founded Reval (now Tallinn) in 1219 and introduced Christianity and Western European culture to Estonia. While Denmark took the northern part of Estonia, the knights occupied the southern portion. In 1346 the Danes sold their territory to the order, and Estonia remained under the rule of the knights and the Hanseatic merchants until the order's dissolution in 1561.
Northern Estonia then passed to Sweden; the rest was briefly held by Poland but was transferred to the Swedes by the Treaty of Altmark (1629), which ended the first Polish-Swedish war. The lot of the Estonian peasants, who had been reduced to virtual serfdom under German landowners, improved somewhat under Swedish rule; but Peter I of Russia conquered Livonia in 1710, and Russian possession was confirmed by the Treaty of Nystad in 1721. Despite some land reforms, the German nobles—the Baltic barons—retained their sway over the Estonian peasantry until the eve of the 1917 Russian Revolution. German burghers controlled most of the urban wealth.
Industrialization proceeded apace during the 19th cent.; the republic became heavily interlaced with railroads, and the port of Tallinn grew in importance. Estonian national consciousness began to stir in the mid-19th cent. but was countered by Russification, which in turn spurred rebellion and considerable emigration (notably to the United States and Canada).
Estonia suffered bloody reprisals for its important role in the Russian Revolution of 1905. In the aftermath of the 1917 Russian Revolution, Moscow appointed a puppet Communist regime under Jaan Anvelt to rule Estonia; its authority, however, failed to extend beyond Tallinn. An Estonian proclamation of independence in Feb., 1918, was followed shortly by German occupation. After Germany surrendered to the Allies in Nov., 1918, Estonia declared itself an independent democratic republic and repulsed the invading Red Army.
In 1920, by the Peace of Tartu, Soviet Russia recognized Estonia's independence. Political stability, however, eluded the republic, which had 20 short-lived coalition regimes before 1933, when a new constitution gave the president sweeping authority. Political parties were abolished in 1934, and President Konstantin Päts instituted an authoritarian regime. A more democratic constitution came into force in 1938; but the Nazi-Soviet Pact of Aug., 1939, placed the Baltic countries under Soviet control, and the following month the USSR secured military bases in Estonia.
Complete Soviet military occupation came in June, 1940. Following elections in July, Estonia was incorporated into the USSR as a constituent republic. Over 60,000 persons were killed or deported during the occupation's first year. Estonian irregulars fought Soviet troops in June, 1941, as part of the German invasion, and their support of the Nazis continued through 1944. Occupied by German troops during much of World War II, Estonia was retaken by Soviet forces in 1944, who, as in 1940, killed or deported thousands of Estonians. Collectivization of agriculture and nationalization of industry began in the late 1940s, and the Estonian economy was steadily integrated with that of the USSR despite strong resistance.
In Mar., 1990, amid increasing liberalization in the USSR, the Estonian Supreme Soviet declared invalid the 1940 annexation by the USSR. In 1991, during the attempted hard-line coup against Soviet President Mikhail Gorbachev, Estonia declared its independence from the USSR. A new constitution was ratified and went into effect in 1992; Lennart Meri was elected president and Mart Laar, a radical free-market advocate, became prime minister. The last Russian troops were withdrawn from Estonia in Aug., 1994.
Laar lost a vote of confidence in 1995 and was replaced by Tiit Vähi, who headed two centrist coalition governments and survived a vote of confidence early in 1997, but resigned shortly thereafter. He was replaced by Mart Siimann, head of the Coalition party and Rural Union, but Laar again became prime minister in Mar., 1999. In Sept., 2001, Arnold Ruutel was elected to succeed Meri as president; Meri was barred from seeking a third term. Laar resigned in Jan., 2002, and Siim Kallas, of the center-right Reform party, succeeded him.
Parliamentary elections in Mar., 2003, left the leftist Center party and conservative Res Publica party with an equal number of seats. Res Publica formed a coalition with the Reform party; Juhan Parts, of Res Publica, became prime minister. In 2004 Estonia became a member of the North Atlantic Treaty Organization and the European Union. Parts' government fell in Mar., 2005, and Andrus Ansip, of the Reform party, formed a new coalition government the following month. Ruutel failed to win a second term in Sept., 2006, when Toomas Hendrik Ilves, a former foreign minister, was elected president.
The Reform party won a plurality of parliamentary seats in the Mar., 2007, elections, and Ansip remained prime minister, leading a new coalition government (re-formed in 2009). The relocation of a Soviet war memorial (and the soldiers buried there) from downtown Tallinn the following month sparked several days of rioting by ethnic Russians, thinly disguised economic retaliation by Russia, and cyberattacks against government and other Estonian computer facilities. The country adopted the euro in 2011. In Mar., 2011, Ansip's coalition won the parliamentary elections, and he remained prime minister. President Ilves was reelected in August.