Pilsen/Plzeň was first mentioned as a castle in 976, as the scene of a battle between Duke Boleslaus II the Pious of Bohemia and Emperor Otto II. It became a town in 1295 when King Wenceslaus II granted Plzeň its civic charter as a "Royal City" and established a new town site, some 10 km (6 mi) away from the original settlement, which is the current town of Starý Plzenec. It quickly became an important town on trade routes leading to Nuremberg and Regensburg; in the 14th century, it was the third-largest town in Bohemia after Prague and Kutná Hora. During the Hussite Wars, it was the centre of Catholic resistance to the Hussites: Prokop the Great unsuccessfully besieged it three times, and it joined the league of Catholic nobles against King George of Podebrady. In 1468, the town acquired a printing press; the Trojan Chronicle (Kronika trojánská in Czech), the first book published in Bohemia, was printed on it.
Emperor Rudolf II made Plzeň his seat from 1599–1600. During the Thirty Years' War the town was taken by Mansfeld in 1618 after the Siege of Plzeň and it was not recaptured by Imperial troops until 1621. Wallenstein made it his winter quarters in 1633. The town was unsuccessfully besieged by the Swedes in 1637 and 1648. The town and region have been staunchly Catholic despite the Hussite Wars. From the end of the 17th century, the architecture of Plzeň has been influenced by the Baroque style. The city centre has been under cultural heritage preservation since 1989.
In the second half of the 19th century Plzeň, already an important trade centre for Bohemia, near the Bavarian/German border, began to industrialise rapidly. In 1869 Emil Škoda started up the Škoda Works, which became the most important and influential engineering company in the country and a crucial supplier of arms to the Austro-Hungarian Army. By 1917 the Škoda Works employed over 30,000 workers. After 1898 the second largest employer was the National Railways train workshop, with about 2,000 employees: this was the largest rail repair shop in all Austria-Hungary. Between 1861 and 1877, the Plzeň railway junction was completed and in 1899 the first tram line started in the city. This burst of industry had two important effects: the growth of the local Czech (Slavic) population and of the urban poor. After 1868 first Czech mayor of the city was elected.
World War II
Following Czechoslovak independence from Austria-Hungary in 1918 the German-speaking minority in the countryside bordering the city of Plzeň hoped to be united with Austria and were unhappy at being included in Czechoslovakia. Many allied themselves to the Nazi cause after 1933, in the hope that Adolf Hitler might be able to unite them with their German-speaking neighbours. Following the Munich Agreement in 1938, Plzeň became literally a frontier town, after the creation of the Sudetenland moved the Third Reich borders to the city's outer limits. During the Nazi occupation from 1939 to 1945 the Škoda Works in Pilsen was forced to provide armaments for the Wehrmacht, and Czech contributions, particularly in the field of tanks, were noted.Between 17 and 26 January 1942, over 2,000 Jewish inhabitants, most of Plzeň's Jewish population, were deported by the Nazis to the Theresienstadt concentration camp.
The German-speaking population was forcibly expelled from the city and indeed all of Czechoslovakia after the end of the war in 1945, according to the provisions of the Potsdam agreement. All of their property was confiscated. On 6 May 1945, near the end of the Second World War, Plzeň was liberated from Nazi Germany by the 16th Armored Division of General Patton's 3rd Army. Also participating in the liberation of the city were elements of the 97th and 2nd Infantry Divisions supported by the Polish Holy Cross Mountains Brigade. Other Third Army units liberated major portions of Western Bohemia. The rest of Czechoslovakia was liberated from German control by the Soviet Red Army. Elements of the 3rd Army, as well as units from the 1st Army, remained in Plzeň until late November 1945, assisting the Czechs with rebuilding.