Milengrad was built during the reign of Hungarian–Croatian King Béla IV after the Mongol invasion of 1241–1242. Around 1303, King Charles Robert donated the fortress to the Cseszneky family in compensation for their loss of Ipolyvisk Castle. The counts Cseszneky sold it soon to Ban Mikcs, who, in 1309, ceded the lordship to the Herkffy family. In 1536, by the marriage between Katalin Herkffy and Miklós Patačić, Milengrad became the two families' shared property. In the 17th century, the Herkffy family became extinct, and the Patačićs followed in the 19th century. Due to the constant warfare with the Ottomans, and probably as well to an earthquake, by the late 17th century several walls of Milengrad fell down, and in 1683 it was already mentioned as arx diruta, a castle in ruins.
References:The Château du Haut-Koenigsbourg is situated in a strategic area on a rocky spur overlooking the Upper Rhine Plain, it was used by successive powers from the Middle Ages until the Thirty Years' War when it was abandoned. From 1900 to 1908 it was rebuilt at the behest of the German kaiser Wilhelm II. Today it is a major tourist site, attracting more than 500,000 visitors a year.
The first records of a castle built by the Hohenstaufens date back to 1147. The fortress changed its name to Koenigsburg (royal castle) around 1157. The castle was handed over to the Tiersteins by the Habsburgs following its destruction in 1462. They rebuilt and enlarged it, installing a defensive system designed to withstand artillery fire.
The fortification work accomplished over the 15th century did not suffice to keep the Swedish artillery at bay during the Thirty Years War, and the defences were overrun.