Loket, originally called Stein-Elbogen due to its rocky location, is said to have been founded in 870 by the margraves of Vohenburg who were then related to the dukes of Bavaria to whom the entire Elbogen districts belonged until the 12th century.
Above all, the castle served as protection to the merchant's path leading from Prague through Cheb and on to Plauen and Erfurt, but after the re-annexation by the Czech state it began functioning as a frontier fortress.
From the 1250s the castle was gradually enlarged and the formerly Romanesque building turned into a Gothic stronghold which was often visited by the members of the royal family.
The last time she had to hide there was in the early spring of 1319,[4] when King John conquered the castle with a trick when he persuaded the guard to open the gate pretending a friendly visit to his wife.
Their three-year-old son Prince Václav, later Emperor and King Charles IV, was held here for two months in the underground prison,[5] a period which he later described as a horrible imprisonment in a cellar with one tiny window.
In his unimplemented code Maiestas Carolina, he classified Loket among the places which should have stayed in permanent property of the Czech crown.
The Hussite Wars did not avoid Loket when it found itself in the hands of the supporter of the Catholic Church burgrave Půta of Illburk.
Of the original Romanesque buildings, those preserved were mainly the extremely rare rotunda, the foundations of the castle tower and those of the northern palace.
The castle continued to be enlarged up to the 1420s and in 1434 it was mortgaged to chancellor Kašpar Slik by Sigismund of Luxembourg[8] as a reward for his financial aid.
Further reconstruction took place in the second half of the 15th century when the castle was turned into a representative ancestral seat under the administration of the House of Slik, which lasted for more than 100 years.
Due to their participation in the revolt of the Czech states against the king, later Emperor Ferdinand I Habsburg, many of the possessions of the House of Slik were confiscated and eventually they lost the castle.
In 1607 the nobleman Jiří Popel of Lobkovic, who was the highest controller of the Czech kingdom, died of an apoplectic stroke in the loket castle jail.
Besides the Margrave's House where an exhibition of porcelain is on display and the remains of a Romanesque rotunda, the smallest of its type in the Czech Republic, the castle also features the prison cells and the chamber of torture, the wedding and the ceremonial hall, the historical arms and Archeological hall, where a maquette of the so-called "bewitched burgrave" Elbogen meteorite is on display, a Romanesque prismatic tower, the 15th-century burgrave's house and the captain's house, and a 16th-century palace with two wings and fortifications incorporating strongholds.
During the archeological research in spring 1993, many fragments as well as other materials from the time of the many reconstruction periods in the Loket castle were found.
In the upper part of the excavation, below the main window, the walls of the palace from the times of the castle reconstruction during the reign of King Wenceslas and the remains of a Renaissance kitchen dating back to 1528–1536 were also found.