So Saul lost his crown on account of Agag, and yet did not accomplish his purpose of saving the life of the Amalekite king, for Samuel inflicted a most cruel death upon Agag, and that not in accordance with Jewish, but with heathen, forms of justice. No witnesses of Agag's crime could be summoned before the court, nor could it be proved that Agag, as the law requires, had been warned when about to commit the crime. Though due punishment was meted out to Agag, in a sense it came too late. Had he been killed by Saul in the course of the battle, the Jews would have been spared the persecution devised by Haman, for, in the short span of time that elapsed between war and his execution, Agag became the ancestor of Haman.
Saul Spares Agag and Loses the Crown of Israel
Legends of the Jews 3:29