As soon as Stjepan Držislav had died in 997, his three sons, Svetoslav (997–1000), Krešimir III (1000–1030), and Gojslav (1000–1020), opened a violent contest for the throne, weakening the state and allowing the Venetians under Pietro II Orseolo and the Bulgarians under Samuil to encroach on the Croatian possessions along the Adriatic. In 1000, Orseolo led the Venetian fleet into the eastern Adriatic and gradually took control of the whole of it, first the islands of the Gulf of Kvarner and Zadar, then Trogir and Split, followed by a successful naval battle with the Narentines upon which he took control of Korčula and Lastovo, and claimed the title "dux Dalmatiæ". Krešimir III tried to restore the Dalmatian cities and had some success until 1018, when he was defeated by Venice allied with the Lombards. The same year his kingdom briefly became a vassal of the Byzantine Empire until 1025 and the death of Basil II. His son, Stjepan I (1030–1058), only went so far as to get the Narentine duke to become his vassal in 1050.