After centuries of foreign domination by Danes, Germans, Swedes, Poles, and Russians, Estonian leaders declared independence from the Russian empire on 24 February 1918. An unstable but democratic parliamentary system operated from 1919 until 1934 when acting president Konstantin Päts seized power and dissolved Parliament. In 1940, the USSR annexed Estonia, making it the Estonian Soviet Socialist Republic (Estonian SSR). The German army invaded Estonia in 1941, ruling it until 1945. It is estimated that 90,000 people, or 8% of the prewar population of Estonia, died in the course of the war. During Stalin's reign, 80,000 people were arrested or deported and 15,000 died in a guerrilla war of resistance.
Under Communism, Estonian culture and other forms of national expression were repressed, and large numbers of Russians settled in Estonia. Russified Estonians (some of whom spoke no Estonian), Russians, and others were brought in to rule Estonia. In the post-Stalin era, dissidents calling for observation of human rights or protesting the repression of the Estonian nation were harassed, arrested, exiled, and even killed.
Significant changes came after Mikhail Gorbachev became leader of the USSR. In fall 1987, the policies of glasnost (openness) and perestroika (restructuring) provided the opportunity to discuss openly various economic, environmental, and historical issues in Estonia for the first time. The Popular Front, an organization dedicated to bringing about progressive changes and unaffiliated with the Communist Party, was established in April 1988. Soon thereafter the government legalized the flag of independent Estonia and declared Estonian the official language of the republic. In November the Estonian Parliament, the Supreme Soviet, interpreted the meaning of "sovereignty" in the republic's Constitution in the broadest possible terms, provoking an angry attack from Gorbachev.
A constitutional amendment adopted in February 1990 stripped the Communist Party of its leading role in Estonian society. In March 1990 the Estonian Communist Party split into two factions, one supporting Moscow, the other declaring itself independent from Moscow. Also in March, 16 parties ran candidates for the 105 seats in the Estonian Riigikogu (Parliament). Estonian nationalists won an overwhelming majority. Arnold Rüütel was elected president by the new Parliament.
When the coup d'état against Mikhail Gorbachev began in Moscow in August 1991, the Estonian government immediately allied with Russian president Boris Yeltsin. On 20 August, Estonia declared itself independent of the USSR; the following day the Russian Federation recognized Estonia as an independent state. The Communist Party of the USSR and other organizations supporting the coup were outlawed. In September, the USSR recognized Estonian independence. The Estonians began to dismantle the Soviet secret police (KGB). The Soviet government agreed to withdraw all its troops from Estonian soil by the end of 1994.
In 1992, a constitutional assembly introduced amendments to the 1938 Constitution. After the draft Constitution was approved by popular referendum, it came into effect 3 July 1992. Elections for the new Parliament and president were held on 20 September 1992, with Lennart Meri as victor.
On 5 March 1995, Estonia held its second parliamentary elections since achieving independence from the USSR. The center-left Coalition Party/Rural Union alliance won an impressive victory, taking 41 seats in the 101-seat Parliament.
The market-reform-oriented Estonian Reform Party-Liberals coalition won 19 seats. The center-left Estonian Center Party finished third with 16 seats. The rightist Pro Patria/Estonian National Independence Party group (now known as the Fatherland Union), fell to only eight seats. A coalition representing the Russian-speaking population, Our Home Is Estonia, won six seats. The Moderates won six seats, and the Rightists won five.
On 5 April 1995, the Parliament elected Coalition Party leader Tiit Vahi as prime minister of Estonia. He formed a government with the Center Party. After a wiretapping scandal, the Center Party was forced out in October 1995 and was replaced by the Reform Party. In November 1996 this coalition collapsed in turn, and the Coalition Party appeared headed back into coalition with the Center Party. Meri ran for reelection as president of Estonia in August 1996. According to Estonia's Constitution, the president is elected by a two-thirds majority in the Estonian Parliament. If no candidate receives the required number of votes after three rounds of voting, an electoral college of members of Parliament and local legislatures selects the president by a simple majority. On 26 and 27 August, Meri handily outscored his main opponent, Arnold Rüütel, in the three rounds of parliamentary voting but did not win a two-thirds majority. In the vote of the electoral college on 20 September Meri won a majority, beating Rüütel by a vote of 196 to 126 (with 44 abstentions and 6 invalid ballots) in the 374-member electoral college.
Meri was constitutionally barred from a third term. Following a stalemate in Parliament over the choice of a new president, Arnold Rüütel won a run-off election on 21 September 2001 and took over duties as president 7 October.