The settlement's first mention in historical documents dates from 1239 when Béla IV of Hungary granted it to the Diocese of Bosnia (), and the Bishop moved his seat here in 1246. The predecessor to the newer St. Peter's Cathedral was built in 1355. In 1374 the settlement is documented under the name Dyacou. Croatian rebels in 1386 on 25 July captured Queen Mary of Hungary and her mother Elizabeth near the settlement.
The settlement's first mention in historical documents dates from 1239 when Béla IV of Hungary granted it to the Diocese of Bosnia (), and the Bishop moved his seat here in 1246. The pre.decessor to the newer St Peter's Cathedral was built in 1355 In 1374 the settlement is documented under the name Dyacou. Croatian rebels in 1386 on 25 July captured Queen Mary of Hungary and her mother Elizabeth near the settlement.