Petar Svačić had assumed the throne of Croatia amid deep tension throughout the Kingdom.
His predecessor, Stjepan II (1089–1091) had died without leaving an heir, sparking a major political crisis.
Jelena or Ilona, the widow of King Dmitar Zvonimir had supported her brother, King Ladislaus I of Hungary, in the inheritance of the throne of Croatia.
A part of Croatia's dignitaries and clergy who did not support Ladislaus' claim had meanwhile elected nobleman Petar as King, who immediately deployed the military to defend Croatia's borders from Hungarian attack, but too late.
Ladislaus, who had probably devised a military strategy two years earlier, launched an offensive and managed to breach Croatian lines along the Drava River.
The well-prepared Hungarians had soon occupied the entire province of Slavonia but were halted by the Croats at Mount Gvozd (nears today's Karlovac).
Ladislaus died in 1095, shortly after his army's success, leaving his nephew Coloman to continue the campaign.
King Petar's troops have maintained their resistance, repelling Hungarian assaults for nearly two years.
Coloman, grown frustrated at his army's impotence, in 1097 assembles an enormous force at the eastern foot of Mount Gvozd.
The subsequent offensive is brutal and absolute, resulting in Petar's death.
Five years of negotiations between Croatia's remaining noblemen and Coloman follow.