After Croatia's King Stjepan Držislav died in 997, his brother Svetoslav Suronja had become King of Croatia. Together with his two brothers Gojslav and Krešimir, they fought between each other for the crown in a civil war. The two brothers probably used his alliance with the Byzantine Empire to ask Bulgaria for help. During that time, a Bulgarian invasion was taking place in which the Bulgarian monarch Samuil pillaged the Dalmatian cities and great parts of Bosnia. During last two years (999–1000) of the Croatian civil war, the revolters had managed to depose Svetoslav Suronja probably with some Bulgarian help, who later turned to the Venetian Doge for alliance in year 1000. Answering that political change, the Venetian Doge Pietro II Orseolo started military intervention in Dalmatia in which he will emerge victorious.