Various western Slavic tribes settled in the area that is now the Czech Republic during the fifth and sixth centuries. The Western Slavic tribes of Moravia united during the eighth century and in the early ninth century established a kingdom that included Bohemia. In 906 Magyars conquered most of the Moravian kingdom. Bohemia remained independent, and a duchy was established there by the native Premysl family. During the early 11th century Moravia was conquered by Bohemia, which grew to become a great medieval kingdom.

In 1526 Bohemia and Moravia were absorbed by the Austrian Hapsburgs and remained under their control until 1918, when an independent Czechoslovakia was formed. For more information about the region's history until 1918, see BOHEMIA and MORAVIA.

The Czech lands (Bohemia and Moravia) united with Slovakia in 1918 to form the Republic of Czechoslovakia. Under the constitution of 1920 Czechoslovakia was a parliamentary democracy. During World War II the country was occupied by Germany. After the war, the Soviet Union installed a Communist government, which ruled until 1989 when it again became a democracy. The Czech Republic and Slovakia agreed by referendum to split into separate nations in 1993 and Václav Havel, who was president of Czechoslovakia during 1989–92, was elected president of the Czech Republic. In 1997, in response to the Czech Republic's desire for a stronger relationship with Western Europe, the republic was invited to join NATO in 1999.