Despite the city's turbulent history, Prague's progress in recent years has been more stately than revolutionary. The booming tourism sector and a solid industrial base have left its citizens in better economic shape than the rest of the country. Unemployment is minimal, the shops are full, and façades that were crumbling a decade ago have been given face-lifts. Big new shopping malls and multiplex cinemas are popping up all over the place, there's a huge new sporting and events arena, the metro system is being extended and a new floodprotection system has been installed.
There are downsides, of course. Rumours of corruption in City Hall are rife, affordable housing remains in short supply, the health system is under strain, and traffic congestion and crime rates are up. Despite this, the mood of the city remains buoyant.
Václav Havel's 13 years as president came to an end in February 2003, when his place was taken by hard-nosed, right-wing economist Václav Klaus. More change was to come: the decision on whether the Czech Republic should join the European Union was settled by a referendum - with 77% voting in favour - and on 1 May 2004 the Czech Republic became a member of the EU.
However, the parliamentary elections of June 2006 ended in stalemate - it looks like a rocky road ahead for Czech politics in the next few years.
The oldest evidence of human habitation in the Prague valley dates from 600, 000 BC, but more numerous clues were left by hunters during the last Ice Age, about 25, 000 years ago. Permanent communities were established around 4000 BC in the northwestern parts of Prague, and the area was inhabited continuously by various Germanic and Celtic tribes before the arrival of the Slavs. The name Bohemia came from a Celtic tribe called Boii, and is still used today for the western part of the Czech Republic.
In the 6th century, two Slav tribes settled on opposite sides of a particularly appealing stretch of the Vltava River. The Czechs built a wooden fortress where the residential area Hradčany stands today, and the Zlíčani built theirs upstream at what is now Vyšehrad. They had barely dug in when nomadic Avars thundered in, to rule until the Frankish trader Samo united the Slav tribes and drove the Avars out. Samo held on for 35 years before the Slavs reverted to squabbling.
In the 9th century Prague was part of the short-lived Great Moravian Empire. Under its second ruler, Rastislav (r 846-70), emissaries were invited to come from Constantinople, and Christianity took root in the region. The Moravians (the ancient lands of Moravia now form the eastern part of the Czech Republic) were ultimately undone by internal conflicts, especially with the Czechs, who finally broke away from the empire.
Prague Castle (Pražský hrad, or just hrad to the Czechs) was built in the 870s by Prince Bořivoj as the main seat of the Přemysl dynasty. Vyšehrad sometimes served as an alternative in the 10th and 11th centuries.
Christianity became the state religion under the rule of the pious Wenceslas (Václav in Czech), duke of Bohemia (r c 925-29), now the chief patron saint of the Czech people. Wenceslas was the 'Good King Wenceslas' of the well-known Christmas carol written in 1853 by English clergyman John Mason Neale. Neale, a scholar of eastern European church history, had read about St Wenceslas' legendary piety, and based his carol on the story of the duke's page finding strength and warmth by following in the footsteps of his master as they carried food, wine and firewood to a poor peasant on a freezing cold Boxing Day. The unfortunate Wenceslas was murdered by his own brother, Boleslav; the Chapel of St Wenceslas in St Vitus Cathedral is decorated with scenes from the saint's life.
In 950 the German king Otto I conquered Bohemia and incorporated it into the Holy Roman Empire. By 993 Přemysl princes had forged a genuine Slav alliance, and ruled Bohemia on the Germans' behalf until 1212, when the pope granted Otakar I the right to rule as a king. Otakar bestowed royal privileges on the Staré Město (Old Town), and Malá Strana (Little Quarter) was established in 1257 by Otakar II.
Přemysl lands stretched at one point from modern-day Silesia (a region on the Czech-Polish border) to the Mediterranean Sea. Their Austrian and Slovenian domains, however, were lost when Otakar II died and his army was thrashed at the 1278 Battle of Moravské Pole (fought near modern-day Dürnkrut in Austria) by the Austrian Habsburgs.
The murder of Wenceslas III in 1306 left no male heir to the Přemysl throne. Two Habsburg monarchs briefly ruled Bohemia until the Holy Roman emperor John of Luxembourg (Jan Lucemburský to the Czechs) also became king of Bohemia by marrying Wenceslas III's daughter Elyška in 1310. Under the rule of John's son Charles (Karel) IV (r 1346-78) as king and Holy Roman emperor, Prague grew into one of the continent's largest and most prosperous cities, acquiring its fine Gothic face, and landmarks including the Karolinum (Charles University), Charles Bridge and St Vitus Cathedral.
The late 14th and early 15th centuries witnessed the Church-reform movement led by Jan Hus. Hus' eventual conviction for heresy and his death at the stake in 1415 sparked a nationalist rebellion in Bohemia led by the Hussite preacher Jan Želivský. In 1419 several Catholic councillors were flung from the windows of Prague's New Town Hall by Želivský's followers, thus introducing the word 'defenestration' (the act of throwing someone or something out of a window) to the political lexicon.
After the death in 1419 of Holy Roman emperor and king of Bohemia Wenceslas IV, Prague was ruled by various Hussite committees. In 1420 combined Hussite forces led by military commander Jan Žižka successfully defended Prague against the first anti-Hussite crusade, launched by Sigismund, the Holy Roman emperor, during the Battle of Vítkov Hill.
In the 1420s a split developed in the Hussite ranks between radical Taborites, who advocated total war on Catholics, and moderate Utraquists, who consisted mainly of nobles who were more concerned with transforming the Church. In 1434 the Utraquists agreed to accept Sigismund's rule in return for religious tolerance; the Taborites kept fighting, only to be defeated in the same year at the Battle of Lipany.
Following Sigismund's death, George of Poděbrady (Jiří z Poděbrad) ruled as Bohemia's one and only Hussite king, from 1452 to 1471, with the backing of Utraquist forces. He was centuries ahead of his time in suggesting a European council to solve international problems by diplomacy rather than war, but he couldn't convince the major European rulers or the pope. After George's death two weak kings from the Polish Jagiellonian dynasty ruled Bohemia, though real power lay with the Utraquist nobles, the so-called Bohemian Estates.
In 1526 the Austrian Catholic Habsburgs were again asked by the Czech nobility to rule Bohemia. In the second half of the century the city enjoyed great prosperity under Emperor Rudolf II, and was made the seat of the Habsburg empire. Rudolf established great art collections, and renowned artists and scholars were invited to his court.
A huge fire in 1541 laid waste many sections of Malá Strana and Hradčany. The fire started on Hradčany Square, on the site now occupied by the Sternberg Palace, and swept through the largely wooden houses of merchants and artisans, destroying most of the district. The rebuilding that took place following the fire gave Hradčany and Malá Strana much of the beautiful Renaissance and baroque architecture that still graces their streets.
An ill-fated uprising of the Bohemian Estates in 1618, which began when two Habsburg councillors and their secretary were flung from an upper window in Prague Castle, dealt a blow to Czech fortunes for the next 300 years. This 'Second Defenestration of Prague' sparked off the Thirty Years' War, devastating much of Europe, and Bohemia in particular - a quarter of the Bohemian population perished.
The following year the Bohemian Estates elected Frederick of the Palatinate as their ruler. But because of ineffective leadership, low morale among their heavily mercenary army, and limited international support, the crucial Battle of Bílá Hora (White Mountain) on 8 November 1620 was lost by the Protestants to the Habsburgs almost before the first shots were fired. The 'Winter King' (so-called because he ruled Bohemia for just one winter) fled and, in 1621, the 27 nobles who had instigated the revolt were executed in Old Town Square; for those with a stomach for these things, the sword of the executioner, Jan Mydlář, is displayed in the museum in the Lobkowicz Palace.
The defeat slammed the door on Czech independence for almost three centuries. Czechs lost their privileges, rights and property, and almost their national identity due to forced Catholicisation and Germanisation (part of the wider Counter-Reformation movement). During the Thirty Years' War, Saxons occupied Prague from 1631 to 1632, and Swedes seized Hradčany and Malá Strana in 1648. Staré Město, though unconquered, suffered months of bombardment. Prague's population declined from 60, 000 in 1620 to 24, 600 in 1648. The Habsburgs moved their throne back to Vienna, reducing Prague to a provincial town, although it did get a major baroque face-lift over the next century, particularly after a great fire in 1689.
In the 18th century the city was again on the move, economically and architecturally. The four towns of Prague - Staré Město, Nové Město, Malá Strana and Hradčany - were joined into a single, strong unit by imperial decree in 1784.
In the 19th century Prague became the centre of the so-called Czech National Revival (České národní obrození), which found its initial expression not in politics - political activity was forbidden by the Habsburgs - but in Czech-language journalism, literature and drama. Important figures included linguists Josef Jungmann and Josef Dobrovský, and František Palacký, author of Dějiny národu českého (History of the Czech Nation). A distinctive architecture also took form; Prague landmarks of this period include the National Theatre and the National Museum.
While many of the countries in post-Napoleonic Europe were swept up by similar nationalist sentiments, social and economic factors gave the Czech revival particular strength. Educational reforms by Empress Maria Theresa (r 1740-80) had given even the poorest Czechs access to schooling, and a vocal middle class was emerging with the Industrial Revolution. Austrian economic reforms, plus changes in industrial production, were forcing Czech labourers into the bigger towns, cancelling out the influence of large German minorities there.
Prague also joined in the 1848 democratic revolutions that swept Europe, and the city was the first in the Austrian empire to rise in favour of reform. Yet like most of the others, Prague's uprising was soon crushed. In 1861, however, Czechs defeated Germans in Prague council elections and edged them out of power forever, though the shrinking German minority still wielded substantial influence well into the 1880s.
Czechs had no interest in fighting for their Austrian masters in WWI, and neighbouring Slovaks felt the same about their Hungarian rulers. Many defected to renegade legions fighting against the Germans and Austrians.
Meanwhile Tomáš Garrigue Masaryk, Edvard Beneš and the Slovak Milan Štefánik began to argue the case - especially in the USA with President Wilson - for the Czechs' and Slovaks' long-cherished dream of independence. Wilson's interest was in keeping with his own goal of closer ties with Europe under the aegis of the League of Nations (the unsuccessful precursor to the United Nations). The most workable solution appeared to be a single federal state of two equal republics, and this was spelled out in agreements signed in Cleveland in 1915 and then in Pittsburgh in 1918.
As WWI drew to a close Czechoslovakia declared its independence, with Allied support, on 28 October 1918. Prague became the capital, and the popular Masaryk, a writer and political philosopher, became the republic's first president.
On 1 January 1922 Greater Prague was established by the absorption of several surrounding towns and villages, growing to a city of 677, 000. Like the rest of the country, Prague experienced an industrial boom until the Great Depression of the 1930s. By 1938 the population had grown to one million.
Unfortunately the new country was not left in peace. Most of the three million German speakers of Bohemia and Moravia wished to join Greater Germany, and in October 1938 the Nazis occupied the Sudetenland (the border regions with Germany and Austria), with the acquiescence of Britain and France in the infamous Munich Agreement. On 15 March 1939 Germany occupied all of Bohemia and Moravia, declaring the region a 'protectorate', while Slovakia proclaimed independence as a Nazi puppet state.
Prague suffered little physical damage during the war, although the Germans destroyed the Czech resistance - and hundreds of innocent Czech villagers - in retaliation for the assassination in Prague of SS General and Reichsprotektor Reinhard Heydrich.
Prague's pre-WWII community of some 120, 000 Jews was all but wiped out by the Nazis. Almost three-quarters of them - and some 90% of all the Jews in Bohemia and Moravia - died of starvation or were exterminated in camps from 1941.
On 5 May 1945 the population of Prague rose against the German forces as the Red Army approached from the east. US troops had reached Plzeň, but held back in deference to their Soviet allies. The only help for Prague's lightly armed citizens came from Russian soldiers of the so-called Vlasov units, former POWs who had defected to the German side and now defected in turn to the Czech cause (they subsequently retreated to western Bohemia and surrendered to the Americans). Many people died before the Germans began pulling out on 8 May, having been granted free passage out of the city by the Czech resistance movement (in return for which the Germans left without destroying any more buildings or bridges).
Most of Prague was thus liberated by its own residents before Soviet forces arrived the following day. Liberation Day is now celebrated on 8 May; under communism it was 9 May.
In 1945 Czechoslovakia was re-established as an independent state. One of the government's first acts was the expulsion of Sudeten Germans from the borderlands. By 1947 nearly 2.5 million Sudetenlanders had been stripped of their Czechoslovak citizenship and their land, and forcibly expelled to Germany (mainly Bavaria) and Austria. Thousands died during forced marches.
Despite a 1997 declaration of mutual apology for wartime misdeeds by the Czech Republic and Germany, the issue still brings emotions to the boil. Most Sudeten survivors feel their Czech citizenship and property were taken illegally. Many Czechs, on the other hand, remain convinced that Sudetenlanders forfeited their rights when they sought help from Nazi Germany, and that a formal apology by President Václav Havel in January 1990 was unwarranted.
In the 1946 elections the Communist Party of Czechoslovakia (KSČ) became the republic's dominant party with 36% of the popular vote, and formed a coalition government with other socialist parties.
Tension grew between democrats and communists, and in February 1948 the communists staged a coup d'état with the backing of the Soviet Union. A new constitution established the KSČ's dominance, and government was organised along Soviet lines. Thousands of noncommunists fled the country.
The 1950s was an era of harsh repression and decline, as communist economic policies nearly bankrupted the country. Many people were imprisoned. Hundreds were executed and thousands died in labour camps, often for little more than a belief in democracy. In a series of Stalin-style purges organised by the KSČ, many people, including top members of the party itself, were executed.
In the late 1960s Czechoslovakia enjoyed a gradual liberalisation under Alexander Dubček, the reformist general secretary of the KSČ. These reforms reflected a popular desire for full democracy and an end to censorship - 'socialism with a human face', as the party called it in its April 1968 'Action Programme'.
But Soviet leaders grew alarmed at the prospect of a democratic society within the Soviet bloc, and its certain domino effect on Poland and Hungary. The brief 'Prague Spring' was crushed by a Soviet-led Warsaw Pact invasion on the night of 20-21 August 1968. Prague was the major objective; Soviet special forces with help from the Czechoslovak secret service, the StB (Státní bezpečnost, or State Security), secured Ruzyně airport for Soviet transport planes. At the end of the first day, 58 people had died. Passive resistance followed; street signs and numbers were removed from buildings throughout the country to disorient the invaders.
In 1969 Dubček was replaced by the orthodox Gustav Husák and exiled to the Slovak forestry department. Around 14, 000 party functionaries and 280, 000 members who refused to renounce their belief in 'socialism with a human face' were expelled from the party and lost their jobs. Many other educated professionals became street cleaners and manual labourers.
In January 1977 a group of 243 writers, artists and other intellectuals signed a public demand for basic human rights, Charta 77, which became a focus for opponents of the regime. Prominent among them was the poet and playwright Václav Havel.
The communist regime remained in control until the breaching of the Berlin Wall in November 1989. On 17 November Prague's communist youth movement organised an officially sanctioned demonstration in memory of nine students who were executed by the Nazis in 1939. But the peaceful crowd of 50, 000 was cornered in Národní třída, where hundreds were beaten by police and about 100 were arrested.
Czechs were electrified by this wanton official violence, and the following days saw nonstop demonstrations by students, artists and finally most of the populace, peaking in a rally on Letná plain by some 750, 000 people. Leading dissidents, with Havel at the forefront, formed an anticommunist coalition, which negotiated the government's resignation on 3 December. A 'Government of National Understanding' was formed, with the communists as a minority group. Havel was elected president of the republic by the federal assembly on 29 December.
The days following the 17 November demonstration have become known as the 'Velvet Revolution' (Sametová revoluce) because of its almost totally nonviolent character.
Free elections to the federal assembly in 1990 were won by Civic Forum (OH) and its Slovak counterpart, People Against Violence (VPN). But the OH soon split, over economic policy, into the right-of-centre ODS led by Václav Klaus, and the left-of-centre OH led by Jiří Dienstbier. Klaus forced through tough economic policies, and their success gave the ODS a slim victory in the 1992 elections.
Meanwhile, separatists headed by Vladimír Mečiar won the 1992 elections in Slovakia, depriving the ODS of a parliamentary majority. The very different economic positions of Mečiar and Klaus made compromise almost impossible, with Mečiar favouring gradual transformation and independence for Slovakia. The two leaders decided that splitting the country was the best solution, and on 1 January 1993, Czechoslovakia ceased to exist for the second time in that century.
Prague became the capital of the new Czech Republic, and Havel was elected as its first president.
Since 1993 Czech politics have been plagued by instability - no election since the Velvet Divorce has produced a government with a majority of more than a single seat. The decade leading up to 2002 was characterised by an unlikely coalition between the nominally right-wing ODS of Václav Klaus (Czech president since 2003), and the supposedly left-wing ČSSD - the equivalent of an alliance between the Conservative and Labour parties in the UK, or between Republicans and Democrats in the USA.
In January 1998 Václav Havel was re-elected as president, by a margin of just one vote. He described the unholy coalition of right and left in the Czech parliament as a deal struck between 'a left-wing party that has for years fought against a government of embezzlers, and a right-wing party that has called for mobilisation against a left allegedly attempting a return to communism'.
The 2006 elections did nothing to improve the situation, resulting in an even split of 100 seats each for the ruling and opposition coalitions. Protracted political wrangling resulted yet again in an unholy alliance between the ODS and ČSSD, and the future of Czech politics - for the short term, at least - looks to be one dominated by crisis management.
In the international arena the Czech Republic has joined the big league: along with Poland and Hungary it became a member of NATO in 1999. The Lower House of the Czech parliament voted 154 to 38 in favour of NATO membership, though there was little public debate on the subject and no public referendum, as was held in Hungary (where 85% voted in favour). Even more momentously, the Czech Republic became one of 10 nations to join the European Union on 1 May 2004.
Relations with Germany and Austria have in recent years been strained by the Czechs' refusal to decommission the ageing Temelin nuclear power station in southern Bohemia, and their continued upholding of the Beneš Decree, which saw the forced expulsion of Sudeten Germans from postwar Czechoslovakia. Despite the apologies of 1990 and 1997, these were just political gestures - the Czech Parliament voted to uphold the decree in 2002 and it remains law, preventing Sudeten Germans from reclaiming their property.