After Croatia's King Stjepan Držislav died in 997, his brother Svetoslav Suronja became King of Croatia. Together with his brother Krešimir III he revolted against Svetoslav Suronja. Because Croatian kings had been allies of the Byzantine Empire during war with the First Bulgarian Empire, the rebels requested Bulgarian help. This resulted in the Bulgarian invasion of 998, during which Emperor Samuil took Croatian Dalmatia and great parts of Bosnia.[1] After the war, the Bulgarian emperor gave this territory to Gojslav and Krešimir III. During the last two years (999–1000) of the Croatian civil war the brothers, with Bulgarian help, defeated Svetoslav Suronja, who went into exile in Venice in 1000. Thereafter, the Venetian Doge, Pietro II Orseolo, successfully intervened in Dalmatia, winning control of the Dalmatian cities.
Gojslav and Krešimir III spent their reign attempting to restore rule over the Dalmatian cities. This brought upon them a renewed conflict with Croatia's former protector, the Republic of Venice, in 1018. Peace was concluded upon the diplomatic intervention of Byzantine Emperor Basil II which confirmed Gojslav and Krešimir III, as Byzantine vassals and kings of Croatia after the defeat of the First Bulgarian Empire. Gojslav died in 1020.