The Šopot inscription, near Benkovac, mentioning Prince Branimir, who was recognised by Pope John VIII in 879 as the ruler of Croatia, while Croatia was recognised as an independent state.
The first Slavic tribes arrived in the area which is modern-day Croatia in the 6th and 7th centuries, during great tribal migrations. Among them were the Croats, who are mentioned in sources in connection with a wider area, but were ethnically most concentrated and historically the strongest in the hinterland of the Adriatic coastline.
In the late 8th and early 9th centuries, they came under Frankish rule (Charlemagne), and were organised in two adjoining duchies (marches or marks) governed by local dukes. The Duchy of Croatia, with its seat in the Knin area, was established in what is today the coastal, mountainous area of southern Croatia, while the Duchy of Lower Pannonia (later Slavonia) was established in the lowlands of northern Croatia, with its seat in Sisak.
In the late 9th century, the Duchy of Lower Pannonia fell under the rule of the Hungarians, while power in the south was assumed by the Trpimirović dynasty. This dynasty began to ascend during the time of Tomislav (914–928), who expanded Croatia in the area of the Duchy of Lower Pannonia as well, and who in 925 was crowned as the first Croatian king. The Trpimirović dynasty reached its zenith with Kings Petar Krešimir IV (1054–78) and Dmitar Zvonimir (1078–89), when Byzantine Dalmatia and the Neretva Duchy were annexed to Croatia. Their reigns were characterised by a blossoming of culture, particularly in architecture and sculpture. The first written monuments in the Croatian language (e.g. the Baška Tablet) date back to this period.
The Ban. This was the traditional title of the high-ranking state official whose main function was to act as regent for the monarch. From the late 12th century, two bans are mentioned; one for Croatia and Dalmatia, and the other for Slavonia.