The origin of the medieval palace fades into the mystery of the past. Due to the scant written sources and archaeological data available, the building of the very first royal palace in Buda cannot be dated or located precisely. The only fact for which there is any evidence is that the construction of Buda Castle took place after the town's foundation following the Tartar occupation. There is reason to assume that this new fortification, established by the king, must also have functioned as a royal residence. This question, however, has been the subject of controversy for a long time.
The history of building of the medieval palace that used to stand on the site of the one existing today can only be traced back to the middle of the 14th century. However, because of the regular devastation of the town, several details of the history of building in the Middle Ages and the Turkish-era are either unclear or disputed. More reliable data and plans are available only from the Baroque era.