Sclaveni raided and settled the western Balkans in the 6th and 7th century. The Serbs are mentioned in De Administrando Imperio as having settled the Balkans during the reign of Emperor Heraclius (r. 610–641), however, research does not support that the Serbian tribe was part of this later migration (as held by historiography) rather than migrating with the rest of Early Slavs. Through linguistical studies, it is concluded that the Early South Slavs were made up of a western and eastern branch, of parallel streams, roughly divided in the Timok–Osogovo–Šar line. Archaeological evidence in Serbia and Macedonia shows that the White Serbs may have reached the Balkans earlier than thought, between 550–600, as many findings of Fibula (brooch)e and pottery at Roman forts point to Serbian characteristics and thus could have represent traces of either part of the Byzantine foedorati or a fraction of the early invading Slavs who upon organizing in their refuge of the Dinarides, formed the ethnogenesis of Serbs and were pardoned by the Byzantine Empire after acknowledging their suzerainty.
The history of the early medieval Serbian Principality and the Vlastimirović dynasty (ruled ca. 610–960) is recorded in the work De Administrando Imperio ("On the Governance of the Empire", DAI), compiled by the Byzantine Emperor Constantine VII Porphyrogenitus (r. 913–959). The DAI drew information on the Serbs from, among others, a Serbian source. The work mentions the first Serbian ruler, without a name (known conventionally as the "Unknown Archon"), that led the Serbs from the north to the Balkans and received the protection of Emperor Heraclius (r. 610–641), and was said to have died long before the Bulgar invasion (680).
According to DAI, "baptized Serbia" (known in historiography as Raška), included the inhabited cities (καστρα/kastra) of Destinikon (Δεστινίκον), Tzernabouskeï (Τζερναβουσκέη), Megyretous (Μεγυρέτους), Dresneïk (Δρεσνεήκ), Lesnik (Λεσνήκ), Salines (Σαληνές), while the "small land" (χοριον/chorion) of Bosna (Βοσωνα), part of Serbia, had the cities of Katera (Κατερα) and Desnik (Δέσνηκ). The first capital was Ras, in Raška (southwestern Serbia). The other Serb-inhabited lands (or principalities) that were mentioned included the "countries" of Paganija, Zahumlje and Travunija, while the "land" of Duklja was held by the Byzantines (it was presumably settled with Serbs as well). These polities bordered Serbia to the north. The exact borders of the early Serbian state are unclear. The Serbian ruler was titled "Prince (archon) of the Serbs" (αρχων Σερβλίας). The DAI mentions that the Serbian throne is inherited by the son, i.e. the first-born; his descendants succeeded him, though their names are unknown until the coming of Višeslav.
Duklja was a medieval Serb state which roughly encompassed the territories of present-day southeastern Montenegro, from the Bay of Kotor in the west to the Bojana river in the east, and to the sources of the Zeta and Morača rivers in the north. First mentioned in 10th– and 11th century Byzantine chronicles, it was a vassal of the Byzantine Empire until it became independent in 1040 under Stefan Vojislav (fl. 1034–43) who rose up and managed to take over territories of the earlier Serbian principality, founding the Vojislavljević dynasty. Between 1043 and 1080, under Mihailo Vojislavljević (r. 1050–81), and his son, Constantine Bodin (r. 1081–1101), Duklja saw its apogee. Mihailo was given the nominal title King of Slavs by the Pope after having left the Byzantine camp and supported a Slavic uprising in the Balkans, in which his son Bodin played a central part. Having incorporated the Serbian hinterland and installed vassal rulers there, this maritime principality emerged as the most powerful Serb polity, seen in the titles used by its rulers ("Prince of Serbia", "of Serbs"). However, its rise was short-lived, as Bodin was defeated by the Byzantines and imprisoned; pushed to the background, his relative and vassal Vukan became independent in Raška, which continued the fight against the Byzantines while Duklja was struck with civil wars. Between 1113 and 1149 Duklja was the centre of Serbian–Byzantine conflict, with members of the Vojislavljević as protégés of either fighting each other for power. Duklja was then incorporated as a crown land of the Grand Principality of Serbia ruled by the Vukanović dynasty, subsequently known as Zeta, remaining so until the fall of the Serbian Empire in the 14th century.
The Serbian Grand Principality, also known as Rascia, was founded in 1090, and ended with the elevation to Kingdom in 1217. During the reign of Constantine Bodin, the King of Duklja, Vukan was appointed to rule Rascia as a vassal, and when Bodin was captured by the Byzantines, Vukan became independent and took the title of Grand Prince. When Bodin had died, Rascia became the strongest entity, in which the Serbian realm would be seated, in hands of the Vukanović dynasty. Uroš I, the son of Vukan, ruled Serbia when the Byzantines invaded Duklja, and Rascia would be next in line, but with diplomatic ties with the Kingdom of Hungary, Serbia retained its independence. Uroš II initially fought the Byzantines, but after a defeat soon swore oaths of servitude to the Emperor. Desa, the brother of Uroš II and an initial Byzantine ally, turned to Hungarian support, but was deposed in 1163, when Stefan Tihomir of a cadet line (which would become Nemanjić dynasty), was put on the throne by the Emperor.