 After the Slavic principality of Carantania was conquered by Frankish forces in 788, the area came under Bavarian influence.German King Henry II ceded ownership of the area in 1004 to Albuin, Bishop of Brixen as a sign of gratitude for the assistance the Church was giving to the king in his attempt to strengthen imperial rule in that part of northern Italy.In 1011, Henry II signed another deed of donation that added the castle and an area of land the size of thirty king's farms.