During the latter part of the 13th century, Öland was established as its own county under Borgholm Castle. In the Middle Ages, Öland would sometimes be an independent county, and sometimes it belonged to Kalmar. The people of Öland had their own dean who belonged to the diocese of Linköping. Öland was divided into ten administrative provinces, hundreds (härader) and thirty or so parishes. The parishes belonged to the northern or southern part of the island. Nowadays, Öland is divided into two municipalities; Borgholm in the north and Mörbylånga in the south.