The oldest evidence of human habitation in the Prague valley dates from around 6000 BC. Permanent farming communities were established in the area by Germanic and Celtic tribes around 4000 BC. Slavs came into the picture around the turn of the millennium, and by the 600 AD had settled opposite sides of a particularly appealing stretch of the Vltava River. They successfully defended the land now known as Bohemia for generations, but by the 9th century it had been conquered by the Great Moravian Empire.
The short-lived empire introduced the locals to Christianity, but it was 'Good King Wenceslas' of Christmas-carol fame (he was actually a duke) who made it the state religion of Bohemia in the 930s. He remains the patron saint of the Czech Republic. It was under the rule of Charles IV (ruled 1346-78) that Prague truly came into its own, becoming one of the continent's largest and most prosperous cities, acquiring its fine Gothic face and landmark buildings like Charles University, Charles Bridge and St Vitus Cathedral.
Jan Hus, who attended Charles University in the late 1380s, rallied popular support for the Church-reform movement; when he was burned at the stake in 1415, the rabble was roused enough to hurl various Catholic officials from the upper stories of Prague's New Town Hall, introducing the word 'defenestration' (literally, to toss someone out a window) into the popular political lexicon. While the 1526 ascent of the Catholic Hapsburg family to power in the region cooled things off briefly, a second round of defenestrations in 1618 made it clear that the matter was not quite settled.
In fact, the insurrection catalyzed the Thirty Years War, which devastated much of Europe; a quarter of Bohemia perished. Their defeat slammed the door on Czech independence for almost three centuries. The Czech national spirit was not so easily crushed, however, and by the 19th century, Prague - which had been unified in 1784 by imperial decree - had become the centre of the so-called Czech National Revival. Czech literature, architecture and journalism were celebrated, even as Czechs were denied participation in the political process.
Nationalist sentiment was growing as waves of pro-democracy protests swept the continent. An 1848 uprising was summarily squelched, but in 1861 the Czech majority defeated German candidates in the Prague council elections. It was a watershed event for Czech independence.