The Transylvanian prince György Rákóczi joined the Second Northern War to gain the throne of Poland, which fell into chaos.
The Habsburgs, who were allied with the Poles, informed the Ottomans to recall the prince, but Rákóczi, confident of victory, disobeyed the sultan.
This had negative consequences as, in the summer of 1657, Rákóczi was forced to return home defeated, and the upcoming Turkish-Tatar campaign threatened the destruction of the principality.
Fearing the revenge of the Ottomans, the Transylvanians soon elected Ferenc Rhédey as their prince, but he soon resigned, and Rákóczi came to power again.
The towns in the Hajdú-Bihar County were destroyed by Szejdi Ahmed Pasha in the deadly raid called "Szejdi-raid," or "Szejdi-járás," as it was known to the Hungarians.
With their non-stop bombardment, they repelled off the defenders of the Golden Bastion, who attempted to stop them but retreated behind the walls and attacked them over their heads.
[3][2][1] The defenders cleaned the rubble with shovels and picks at night, but their efforts were in vain because the walls continued to collapse the next day.
Women and girls from the castle joined the fight and assisted them in repelling the attack with hot water, stones, and whatever they could find, which, with great effort, came at the cost of heavy losses.