They defeated the forces of the Shirvanshah Farrukh Yassar near Cabanı (present-day Shamakhi Rayon, Azerbaijan Republic) or at Gulistan (present-day Gülüstan, Goranboy, Nagorno-Karabakh), and subsequently went on to conquer Baku.