In Hungary, the Mongol invasions of the thirteenth century emphasized the need for castles to defend against marauders from the east; although many older castles were razed by the Mongols, they were rebuilt stronger in the decades after the dreaded Tartars vanished, on the orders of King Béla IV, who demanded a castle on every hilltop in his realm.

