Buda Castle (Hungarian: Budavári Palota, German: Burgpalast, Turkish: Budin Kalesi) is the historical castle and palace complex of the Hungarian kings in Budapest, and was first completed in 1265. In the past, it has been called Royal Palace (Hungarian: Királyi-palota) and Royal Castle (Hungarian: Királyi Vár, German: Königliche Burg). Buda Castle was built on the southern tip of Castle Hill, bounded on the north by what is known as the Castle District (Várnegyed), which is famous for its Medieval, Baroque, and 19th-century houses, churches, and public buildings. It is linked to Clark Ádám Square and the Széchenyi Chain Bridge by the Castle Hill Funicular. The castle is a part of the Budapest World Heritage Site, which was declared a Heritage Site in 1987.
The first royal residence on the Castle Hill was built by King Béla IV of Hungary between 1247 and 1265. It is uncertain whether it was situated on the southern tip of the hill or on the northern elevation, near the Kammerhof. The oldest part of the present-day palace was built in the 14th century by Stephen, Duke of Slavonia, who was the younger brother of King Louis I of Hungary. Only the foundations remain of the castle keep, which was known as Stephen's Tower (Hungarian: István-torony). The Gothic palace of King Louis I was arranged around a narrow courtyard next to the keep. King Sigismund significantly enlarged the palace and strengthened its fortifications. Sigismund, as a Holy Roman Emperor, needed a magnificent royal residence to express his prominence among the rulers of Europe. He chose Buda Castle as his main residence, and during his long reign it became probably the largest Gothic palace of the late Middle Ages. Buda was an important artistic centre of the International Gothic style. Construction began in the 1410s and was largely finished in the 1420s, although some minor works continued until the death of the king in 1437. The palace was first mentioned in 1437, under the name "fricz palotha". The most important part of Sigismund's palace was the northern wing, known as the Fresh Palace (Hun: Friss-palota). On the top floor was a large hall called the Roman Hall (70×20 m or 230×66 ft) with a carved wooden ceiling. Great windows and balconies faced toward the city of Buda. The façade of the palace was decorated with statues, a and coat-of-arms. In front stood the bronze equestrian statue of Sigismund, later repaired by King Matthias Corvinus. The southern part of the royal residency was surrounded with narrow zwingers. Two parallel walls, the so-called "cortina walls", run down from the palace to the River Danube across the steep hillside. The most imposing structure, the Broken Tower (Hun: Csonka-torony), on the western side of the cour d'honneur, remained unfinished. The basement of the tower was used as a dungeon; the top floors were probably the treasury of the royal jewels. The last phase of large-scale building activity took place under King Matthias Corvinus. During the first decades of his reign the king finished the work on the Gothic palace. The Royal Chapel, with the surviving Lower Church, was likely built at that time. After the marriage of Matthias and Beatrice of Naples in 1476, Italian humanists, artists, and craftsmen arrived at Buda. The Hungarian capital became the first centre of Renaissance north of the Alps. The king rebuilt the palace in an early Renaissance style. The cour d'honneur was modernized and an Italian loggia was added. Inside the palace were two rooms with golden ceilings: the Bibliotheca Corviniana and a passage with the frescoes of the twelve signs of the Zodiac. The façade of the palace was decorated with statues of John Hunyadi, László Hunyadi, and King Matthias. In the middle of the court there was a fountain with a statue of Pallas Athene. Only fragments remain of this Renaissance palace: some red marble balustrades, lintels, and decorative glazed tiles from stoves and floors.
The reconstructed medieval fortifications and the Great Rondella In the last years of his reign Matthias Corvinus started construction of a new Renaissance palace on the eastern side of the Sigismund Courtyard, next to the Fresh Palace. The Matthias Palace remained unfinished because of the king's early death. The palace had a monumental red marble stairway in front of the façade. Matthias Corvinus was usually identified with Hercules by the humanists of his court; the bronze gates were decorated with panels depicting the deeds of Hercules, and a great bronze statue of the Greek hero welcomed the guests in the forecourt of the palace complex, where jousts were held. The walled gardens of the palace were laid out on the western slopes of the Castle Hill. In the middle of the enclosure, a Renaissance villa was built by Matthias. Only one column survives of this so-called Aula Marmorea. After the death of Matthias Corvinus, his successor, King Vladislaus II, carried on the works of the Matthias Palace, especially after his marriage with Anna of Foix-Candale in 1502. Under the reign of King John Zápolya (the last national ruler of Hungary) the palace was repaired. On the southern tip of the Castle Hill, the Great Rondella was built by Italian military engineers. The circular bastion is one of the main surviving structure of the old palace.
After the Battle of Mohács, the medieval Kingdom of Hungary collapsed. The Ottoman Turks occupied the evacuated town on 11 September 1526. Although Buda was sacked and burned, the Royal Palace was not damaged. Sultan Suleiman the Magnificent carried away all the bronze statues (the Hunyadis, Pallas Athene, and Hercules) with him to Constantinople. The statues were destroyed there in a rebellion a few years later. The Sultan also took many volumes from the Corvina library. In 1529 the Ottoman army besieged and occupied Buda again, and the palace was badly damaged. On 29 August 1541 Buda was occupied again by the Ottomans, without any resistance. Buda became part of Ottoman Empire and the seat of the Eyalet of Budin. Although Turkish travel writers wrote enthusiastically about the beauty of the palace of the Hungarian kings, the new Ottoman government let the palace decay. It was partially used as barracks, a storage place, and stables, and otherwise it stood empty. The palace was called Iç Kala ("Inner Castle") and Hisar Peçe ("Citadel") by the Turks. The name of the cour d'honneur was "Seray meydani". The favourite nickname of the complex was "Palace of the Golden Apples". In the era between 1541 and 1686, the Habsburgs tried to re-capture Buda several times. Unsuccessful sieges in 1542, 1598, 1603, and 1684 caused serious damage. The Ottoman authorities repaired only the fortifications. According to 17th-century sources, many buildings of the former Royal Palace were roofless and their vaults collapsed. Nonetheless the medieval palace mostly survived until the great siege of 1686.
The medieval palace was destroyed in the great siege of 1686 when Buda was captured by allied Christian forces. In a heavy artillery bombardment, many buildings burned and collapsed. The Stephen's Tower, used as a gunpowder store by the Ottomans, exploded when hit by a single cannon, said to have been fired by a friar called Gábor, also referred as Tüzes Gábor ("Gabriel Fiery"). According to contemporary sources, the explosion killed as many as 1,500 Turkish soldiers and caused a tidal wave on the Danube that washed away artillery batteries and guards standing on the opposite shore. Habsburg military engineers made several plans and drawings of the buildings in subsequent decades. Although the walls mainly survived, the burned-out shell rapidly decayed from a lack of maintenance. Between 1702 and 1715, Stephen's Tower disappeared completely, and the palace was beyond repair. In 1715, King Charles III ordered the demolition of the ruins. Johann Hölbling surveyed the still-existing structures. The king ordered the surviving marble statues, antiquities, inscriptions, and coins should be spared (there is no evidence about the realization of the royal decree). The main part of the palace and the Broken Tower were totally demolished, the hollows and moats were filled, and a new flat terrace was established. The southern fortifications, zwingers, and rooms were buried under tons of rubbish and earth.
In 1715 a small Baroque palace was built according to the plans of Johann Hölbling. It was a simple rectangular building, with an inner court and a shorter side wing, which was later demolished. The Hölbling palace is identical with the core of the present-day palace, where the Baroque Court of the Budapest Historical Museum is now located. The interior of the palace was left unfinished when work stopped in 1719. The Hofkriegsrat commissioned Fortunato di Prati to make several plans for the palace, but lack of money hindered their implementation. In 1723 the palace was accidentally burned down, and the windows were walled up in order to stop further deterioration. Several drawings from the 1730s and 1740s show the unfinished decaying shell of the simple two-storey blockhouse. Some engravings show an idealized finished version which never existed. Sometime around 1730 the roof was repaired.