The medieval Serbian Kingdom arose from the zupas, small Slavic principalities of the central Balkans, which had passed between Byzantine, Bulgarian and Frankish influence since the 7th century. Its founder was Stefan Nemanja, grand zupan of Raska from 1166, who united the Serbian lands, took advantage of Emperor Manuel I's death to break from Byzantium, and annexed Zeta (Montenegro) and lands toward the Adriatic. Nemanja allied at times with Hungary, Venice and the Normans, fought the Bulgarians and the emperor Isaac II, and in 1196 abdicated in favor of his son Stefan and withdrew to Mount Athos as the monk Simeon, founder with his youngest son Rastko, Saint Sava, of the Serbian monastery of Hilandar.
Sava gave the kingdom its church. After the crusaders' sack of Constantinople in 1204 shattered Byzantine control, he secured in 1219 from the exiled patriarch at Nicaea an autocephalous Serbian archbishopric, and organized its dioceses, wrote its first laws, and anchored national life in the monasteries, Zica, Studenica, Mileseva, whose frescoes are masterpieces of Byzantine-inherited art. His brother Stefan, crowned in 1217 with a crown sent by the pope, became the 'First-Crowned' king; Serbia thereafter balanced between Rome and Constantinople, marrying into both worlds while keeping the Orthodox faith.
The 13th-century kingdom prospered on its silver mines, Novo Brdo and Srebrenica among the richest in Europe, worked by Saxon miners, and on the trade of Ragusa (Dubrovnik). Kings Uros I and Dragutin extended Serbian rule south into Macedonia at Byzantine expense, and King Milutin (1282-1321) pushed deep into Byzantine Macedonia, taking Skopje as his capital and building churches from Gracanica to Studenica that mark the golden age of medieval Serbian art. Milutin married the emperor's daughter and styled himself almost a Byzantine ruler, and his court rivaled Constantinople in ceremony.
The stage was set for Stefan Dusan (1331-1355), Milutin's grandson, who exploited the Byzantine civil wars to conquer most of Albania, Epirus, Macedonia and Thessaly, and in 1346 had himself crowned 'Emperor of the Serbs and Greeks', raising the Serbian church to a patriarchate. His Serbian Empire, the largest state in the Balkans, promulgated Dusan's Code (1349), a major monument of medieval law. It did not outlive him: Dusan died in 1355 marching, some said, on Constantinople, his son Uros 'the Weak' could not hold the magnates, and the empire fragmented into lordships that faced the advancing Ottomans alone, falling one by one after Maritsa (1371) and Kosovo (1389). The Nemanjic kingdom's legacy, its church, monasteries and law, became the core of Serbian national memory.