The War with Amalek: Saul Loses the Kingdom
Samuel conveys the command to wipe out Amalek. Saul spares king Agag and the best livestock — and hears: "Obedience is better than sacrifice." The kingdom is given to another.
The command to blot out the memory of Amalek — the nation that attacked Israel from behind, at the stragglers, after the Exodus — was tied by the Torah to the time "when God gives you rest from all your enemies." Samuel came to Saul and said: that time has come.
Saul mustered the army, warned the Kenites to withdraw, and struck Amalek from Havilah to Shur. But he did not carry the order through: he spared king Agag and kept the best sheep and cattle — "the people had pity." That night God told Samuel: I regret making Saul king. The prophet wept all night and came to the king in the morning.
Saul greeted him with "I have fulfilled the word of the Lord." Samuel answered with a question that became proverbial: "Then what is this bleating of sheep in my ears?" The king said the animals were taken for sacrifice. And the verdict came: "Behold, obedience is better than sacrifice... because you rejected the word of the Lord, He has rejected you as king." Saul seized the hem of Samuel's robe, it tore, and the prophet said: so the kingdom has been torn from you and given to your fellow, who is better than you. Agag was executed by Samuel himself at Gilgal.