in recent times. In the following decade, during the succession crisis, the city was the permanent residence of a local lord Petar Svačić, who contested the crown of Croatia until his defeat by king Coloman of Hungary in 1096. At that point, it came into possession of the Hungarian Arpad dynasty, and since then, it ceased to be a permanent royal residence but remained as a political and administrative center of the kingdom. The parish church dedicated to king Saint Stephen is thought to have been built during this period. In 1178, it is for the first time mentioned as "civitates" (city) in a contemporary local source. Due to the extinction of the local ruling dynasty, the Croatian bishop moved his see to Knin itself, after which he started calling himself the Bishop of Knin. This precipitated the construction of a new cathedral, which was initiated in 1203 by the son of the Duke of Knin, Dobroslav in Kapitul. The city was visited by Queen Maria Laskarina, the daughter of the Byzantine Emperor and wife of king Béla IV of Hungary, together with her retinue of nobles and a great number of soldiers in 1261 in order to introduce her son to the Croatian nobility and to negotiate their oath in recognizing him as the designated duke (herceg). In 1264, the first case of judicial function in the city was mentioned and during this time, Knin was the seat of both the Croatian ban, and the duke, who acted as a semi-independent ruler with close connection to the king and whose chancellor had been the bishop of Knin. Between 1270 and 1272, the new cathedral was consecrated on the orders of the Knin bishop Nicholas. The cathedral is described as being "magnificent" and "solemn" by subsequent documents. By this point, a new town had already developed outside the castle complex. A market square (forum) was for the first time mentioned in the second half of 13th century. The transition from 13th to 14th century was marked in the rise of the Šubić noble family, whose members likely made Knin as one of the seats within their realm. According to the 19th century Franciscan friar and historian Donato Fabianich, the monastery of Saint Catherine was founded around this time by the Knin dignitaries and nobility which were first settled there by Mladen Šubić. Their rule over Knin came to an end