According to Augustin Calmet, an 18th-century Bible scholar, Stanisław asked the King for three days to produce his witness, Piotr. The King and court were said to have laughed at the absurd request, but the King granted Stanisław the three days. Stanisław spent them in ceaseless prayer, then, dressed in full bishop's regalia, went with a procession to the cemetery where Piotr had been buried three years earlier. He had Piotr's grave dug up until his remains were discovered. Then, before a multitude of witnesses, Stanisław bade Piotr rise, and Piotr did so.
Piotr was then dressed in a cloak and brought before King Bolesław to testify on Stanisław's behalf. The dumbfounded court heard Piotr reprimand his three sons and testify that Stanisław had indeed paid for the land. Unable to give any other verdict, the King dismissed the suit against the Bishop. Stanisław asked Piotr whether he would remain alive but Piotr declined, and so was laid to rest once more in his grave and was reburied.
A more substantial conflict with King Bolesław arose after a prolonged war in Ruthenia, when weary warriors deserted home, alarmed at tidings that their overseers were taking over their estates and wives. According to Kadłubek, the King punished the soldiers' faithless wives very cruelly and was criticized for it by Bishop Stanisław. Jan Długosz, however, writes that the Bishop had in fact criticized the King for his own sexual immorality. According to recent historians, Stanisław took part in a plot of nobles, aimed to gain more powers or dethrone the king. Gallus Anonymus in his laconic account only condemned both "traitor bishop" and violent king.
Whatever the actual cause of the conflict between them, the result was that the Bishop excommunicated King Bolesław. The excommunication aided the King's political opponents, and the King accused Bishop Stanisław of treason and had him killed.
King Bolesław sent his men to execute Bishop Stanisław without trial, but that when they dared not touch the Bishop, the King decided to kill the traitor himself. He is said to have slain Stanisław while he was celebrating Mass in the Skałka outside the walls of Kraków. According to Paweł Jasienica: Polska Piastów, it was actually in Wawel castle. The Bishop's body was then hacked to pieces and thrown into a pool outside the church. According to the legend, his members miraculously reintegrated while the pool was guarded by four eagles.
The exact date of Stanisław's death is uncertain. According to different sources, it was either April 11 or May 8, 1079. The murder stirred outrage through the land and led to the dethronement of King Bolesław II the Bold, who had to seek refuge in Hungary and was succeeded by his brother, Władysław I Herman. Whether Stanisław should be regarded a traitor or a hero, remains one of the classic unresolved questions of Polish history. Stanisław's story has a parallel in the murder, nine decades later, in 1170, of Thomas Becket by henchmen of England's King Henry II.