 During this period the castle was built, the modern town growing around it.From 776, Gemona became an important part of the Patriarchate of Aquileia.In the 12th century Gemona was an autonomous commune