Legend attributes the town's establishment to the mythical ruler Krakus, who built it above a cave occupied by a ravenous dragon, Smok Wawelski.
The first appearance of the city's name in historical records dates back to 966, when a Sephardi Jewish traveller, Abraham ben Jacob, described Kraków as a notable commercial centre under the rule of the then duke of Bohemia (Boleslaus I the Cruel).
In 1079 on a hillock in nearby Skałka, the Bishop of Kraków, Saint Stanislaus of Szczepanów, was slain by the order of the Polish king Bolesław II the Generous.
Kraków was rebuilt in 1257, in a form which was practically unaltered, and received self-government city rights from the king based on the Magdeburg Law, attracting mostly German-speaking burghers.
City Law, including guilds' depictions and descriptions, were recorded in the German language Balthasar Behem Codex.
Around 1502 Kraków was already featured in the works of Albrecht Dürer as well as in those of Hartmann Schedel (Nuremberg Chronicle) and Georg Braun (Civitates orbis terrarum).
In 1485 Jewish elders were forced into a renunciation of trade in Kraków, which led many Jews to leave for Kazimierz that did not fall under the restrictions due to its status as a royal town.
The period, which elevated the intellectual pursuits, produced many outstanding artists and scientists such as Nicolaus Copernicus who studied at the local Academy.
He married Bona Sforza of a leading Milan family and using his new Italian connections began the major project (under Florentine architect Berrecci) of remaking the ancient residence of the Polish kings, the Wawel Castle, into a modern Renaissance palace.
In December 1656, Kraków was occupied by the Transylvanian Prince George II Rákóczi, who was an ally of the Swedish king Charles X Gustav.
[22] In the late 18th century, the Polish–Lithuanian Commonwealth was partitioned three times by its expansionist neighbors: Imperial Russia, the Austrian Empire, and the Kingdom of Prussia.
When Napoleon Bonaparte of the French Empire captured part of what had once been Poland, he established the Duchy of Warsaw (1807) as an independent but subordinate state.
West Galicia, including Kraków, was taken from the Austrian Empire and added to the Duchy of Warsaw in 1809 by the Treaty of Schönbrunn, which ended the War of the Fifth Coalition.
After the Austro-Prussian War of 1866, Austria granted partial autonomy to Galicia,[25] making Polish a language of government and establishing a provincial Diet.
[26] Several important commemorations took place in Kraków during the period from 1866 to 1914, including the 500th Anniversary of the Battle of Grunwald in 1910,[27] in which world-renowned pianist Ignacy Paderewski unveiled a monument.
The Fin de siècle Kraków, even under the partitions, was famously the center of Polish national revival and culture, but the city was also becoming a modern metropolis during this period.
Russian troops besieged Kraków during the first winter of the First World War, and thousands of residents left the city for Moravia and other safer locales, generally returning in the spring and summer of 1915.
During the war Polish Legions led by Józef Piłsudski set out to fight for the liberation of Poland, in alliance with Austrian and German troops.
The residents of the city were saved from German attack by the courageous Mayor Stanisław Klimecki who went to meet the invading Wehrmacht troops.
On November 6, during the infamous Sonderaktion Krakau 184 professors and academics of the Jagiellonian University (including Rector Tadeusz Lehr-Spławiński among others) were arrested at the Collegium Novum during a meeting ordered by the Gestapo chief SS-Obersturmbannführer Bruno Müller.
[39] Many relics and monuments of national culture were looted and destroyed (yet again), including the bronze statue of Adam Mickiewicz stolen for scrap.
[43] Kraków became the seat of one of the six main commands of the Union of Armed Struggle in occupied Poland (alongside Warsaw, Poznań, Toruń, Białystok and Lwów).
[46] A common account popularized in the Soviet-controlled communist People's Republic of Poland, held that due to a rapid advance of the Soviet armies, Kraków allegedly escaped planned destruction during the German withdrawal.
[48][49][50] According to a version based on self-written Soviet statements,[51] Marshal Ivan Konev claimed to have been informed by the Polish patriots of the German plan,[49] and took an effort to preserve Kraków from destruction by ordering a lightning attack on the city while deliberately not cutting the Germans from the only withdrawal path, and by not aiding the attack with aviation and artillery.
[52] The credibility of those accounts has been questioned by Polish historian Andrzej Chwalba who finds no physical evidence of the German master plan for demolition and no written proof showing that Konev ordered the attack with the intention of preserving the city.
The Red Army entry into the city was accompanied by a wave of rapes of women and girls resulting in official protests.
[53][54] After the war, the government of the People's Republic of Poland ordered the construction of the country's largest steel mill in the suburb of Nowa Huta.
This was regarded by some as an attempt to diminish the influence of Kraków's intellectual and artistic heritage by industrialization of the city and by attracting to it the new working class.
After the collapse of the Soviet Empire and the subsequent joining of the European Union, Offshoring of IT work from other nations has become important to the economy of Kraków and Poland in general in recent years.
There are about 20 large multinational companies in Kraków, including centers serving IBM, General Electric, Motorola, and Sabre Holdings, along with British and German-based firms.