 There appear counts of Istria late in the 10th century, but Istria together with the March of Carniola was separated from the Carinthian duchy in 1040, when both were bestowed on the Thuringian Count Poppo of Weimar, heir by marriage to the last known Friulian margrave Weriand ().The Carniolan margraves gradually acquired the northeastern territories of the peninsula, while the western and southern coast was gradually occupied by the Republic of Venice.The German king Henry IV nominally assigned the remaining march to the Patriarchate of Aquileia, the margravial title and the Istrian territories were however retained by Carniola.