The history of Prague covers more than a thousand years, during which time the city grew from the Vyšehrad Castle to the capital of a modern European state, the Czech Republic.
Prehistory
The land where Prague came to be built has been settled since the Paleolithic Age. Several thousand years ago, trade routes connecting southern and northern Europe passed through this area, following the course of the river. From around 500 BC the Celtic tribe known as the Boii were the first inhabitants of this region known by name. The Boii gave their name to the region of Bohemia and the river Vltava. The Germanic tribe Marcomanni migrated to Bohemia with its king, Maroboduus, in AD 9. Meanwhile, some of the Celts migrated southward while the remainder assimilated with the Marcomanni. In 568, most of the Marcomanni migrated southward with the Lombards, another Germanic tribe. The rest of the Marcomanni assimilated with the invading West Slavs. (The "Migration of Nations" started in the 2nd century; it ended at the end of the 9th and at the beginning of the 10th centuries). The Byzantine historian Prokopios mentions the presence of the Slavs in these lands in AD 512.
According to legend, Princess Libuše, the sovereign of the Czech tribe, married a humble ploughman by the name of Přemysl and founded the dynasty carrying the same name. The legendary princess saw many prophecies from her castle Libusin, which was located in central Bohemia. (Archaeological finds dating back to the eighth century support the theory of the castle's location). In one prophecy, it is told, she foresaw the glory of Prague. One day she had a vision: "I see a vast city, whose glory will touch the stars! I see a place in the middle of a forest where a steep cliff rises above the Vltava River. There is a man, who is chiselling the threshold (prah) for the house. A castle named Prague (Praha) will be built there. Just as the princes and the dukes stoop in front of a threshold, they will bow to the castle and to the city around it. It will be honoured, favoured with great repute, and praise will be bestowed upon it by the entire world."
Medieval Prague
From around 900 until 1306, Czech Přemyslid dynasty rulers had most of Bohemia under their control. The first Bohemian ruler acknowledged by historians was the Czech Prince Bořivoj Přemyslovec, who ruled in the second half of the 9th century. He and his wife Ludmila (who became a patron saint of Bohemia after her death) were baptised by Metodej, who (together with his brother Cyril) brought orthodox Christianity and a new alphabet called Glagolitic script to Moravia in 863 which would later be suppressed by the latin Franks. Bořivoj moved his seat from the fortified settlement Levý Hradec to a place called Prague (Praha). Prague Castle was built by Bořivoj around 880, and it is one of the largest castles in the world. Since Bořivoj's reign the area has been the seat of the Czech rulers. Prague Castle became one of the largest inhabited fortresses in Europe. Today, it is the seat of the Czech president.
Bořivoj's grandson, Prince Wenceslas, initiated friendly relations with the Saxon dynasty. Wenceslas wanted Bohemia to become an equal partner in the larger empire (in a similar way, Bohemia had belonged to Great Moravia in the 9th century and to Samo's empire in the 7th century; both of these empires had been founded to resist the attacks of the Avars). Orientation towards the Saxons was not favoured by his brother Boleslav, and it was the main reason why Prince Wenceslas was assassinated on September 28, 935. He was buried in St. Vitus' Rotunda, the church which he founded (it stood on the ground where St. Wenceslas' Chapel in St. Vitus Cathedral now is). A few years later Wenceslas was canonised and became Bohemia's most beloved patron saint (he is "Good King Wenceslas" from the Christmas carol). In 950, after long war, Boleslav was forced to accept the supremacy of Otto I the Great from the Saxon dynasty, who later became the emperor. From 1002 (definitely 1041) onward Bohemian dukes and kings were vassals of the Holy Roman Emperors and Czech lands appertained to Holy Roman Empire as autonomous territory.
By the early 10th century, the area around and below Prague Castle had developed into an important trading centre, where merchants from all over Europe gathered. In 965, an Arab merchant and traveller, called Ibrahim ibn Ya'qub wrote: "Prague is built from stone and lime, and it has the biggest trade centre. Slavs are on the whole courageous and brave... They occupy the lands which are the most fertile and abundant with a good food supply."