The castle was first documented in the 14th century and belonged to the lords of Keutzl, the lords of Pirglstein and later the lords of Rehling until the 16th century. In the 17th century, the castle was purchased by Archbishop Johann Ernst von Thun, but in 1695 it became a nunnery of the Ursuline Sisters. However, this was short-lived and three years later, the nuns moved to Gstättengasse.
