Czechoslovakia was one of the successor states to the Austro-Hungarian Empire and included the territories of today's Czech Republic, Slovakia and Ukraine. On 28 October 1918, the Czechoslovak Republic was proclaimed a free democratic constitutional state based on the Western model. Tomáš Garrigue Masaryk became its first president. Czechoslovakia remained a democratic and comparatively prosperous state until September 1938. Then, the major Western nations agreed to German territorial demands in order to avoid war. The so-called Munich Agreement settled, that Czechoslovakia should cede the Sudeten German territories that hosted a majority of German-speaking citizens to National Socialist Germany. They were occupied by the Wehrmacht in October 1938 and incorporated into the German Reich as Reichsgau Sudetenland. Similar arrangements were made for Polish minorities. Thus, the Teschen area was simultaneously occupied by Poland. After Slovakia was separated from the Czechoslovak Republic under German pressure, the remaining areas were occupied by the German Wehrmacht and declared as Protectorate of Bohemia and Moravia on 16 March 1939. In this way, the Czechoslovak Republic became occupied by National Socialist Germany already before the beginning of the Second World War.
After the end of the Second World War, the Czechoslovak Republic was restored within borders prior to the Munich Agreement, except for the Carpathian Ukraine. The German population, especially in the Czech Republic, was mostly displaced or resettled. In a formally legal procedure, the Communist Party of Czechoslovakia forced the appointment of a Communist government in February 1948. This sealed the country's fate as subject to the Soviet sphere of influence and effectively ended democracy. In 1968 Communist Party Chairman Alexander Dubček led a reformist alliance towards "socialism with a human face" but Soviet troops and allies of the Warsaw Pact bloodily put the "Prague Spring" down. In 1977, the signing of the petition "Charta 77" gave rise to a civil rights movement, whose initiators and supporters were sometimes subjected to long prison sentences.
The peaceful protests during the Velvet Revolution in 1989 finally ended the rule of the Communist Party. In December a mostly non-Communist government was formed and the civil rights activist Václav Havel became the President of the Republic. In June 1990 the first free parliamentary elections since 1945 were held. On 1 January 1993, the Czechoslovak state was divided by mutual agreement into two independent states, the Czech Republic and the Slovak Republic.