Samuel told Saul, “The Lord sent me to anoint you king of his people Israel. So now pay attention to what the Lord has to say. This is what the Lord Almighty says: I observed what the Amalekites did to Israel when they ambushed them on their way from Egypt. Go and attack the Amalekites and exterminate all of them. Don't spare anyone, but kill every man, woman, child, and baby; every ox, sheep, camel, and donkey.”
Saul called up his army at Telem.* Here spelled Telaim, but thought to be the same town called Telem in Joshua 15:24. There were 200,000 Israelite infantry and 10,000 men from Judah. Saul advanced on the town of Amalek and set up an ambush in the valley. Saul sent a message to warn the Kenites, “Move out of the area and leave the Amalekites so that I don't destroy you with them, because you showed kindness to all the people of Israel on their way from Egypt.” So the Kenites moved away and left the Amalekites.
Saul defeated the Amalekites from Havilah as far as Shur, to the east of Egypt. He captured Agag, king of Amalek, alive, but exterminated all the people by the sword. Saul and his army spared Agag, together with the best sheep and cattle, the fat calves and lambs, and everything else that was any good. They didn't want to destroy those, but they completely destroyed all that was unwanted and worthless.
10 The Lord sent a message to Samuel, saying, 11 “I'm sorry I made Saul king, for he has given up following me and hasn't done as I ordered.” Samuel was upset, and he cried out to the Lord all through the night.
12 Samuel got up early in the morning and went to meet Saul, but he was told, “Saul's gone to Carmel. There he's even erected a monument to honor himself, and now he's left and gone down to Gilgal.”
13 When Samuel caught up with him, Saul said, “The Lord bless you! I have done what the Lord ordered.”
14 “So what's this bleating of sheep my ears are picking up? What's this lowing of cattle that I'm hearing?” Samuel asked.
15 “The army brought them from the Amalekites,” Saul replied. “They spared the best sheep and cattle to sacrifice to the Lord your God, but we completely destroyed the rest.”
16 “Oh, be quiet!” Samuel told Saul. “Let me tell you what the Lord told me last night.”
“Tell me what he said,” Saul replied.
17 “Once you didn't use to think much of yourself, but haven't you become the leader of the tribes of Israel?” Samuel asked. “The Lord anointed you king of Israel. 18 Then he sent you out to do something, telling you, ‘Go and exterminate those sinners, the Amalekites. Attack them until they're all destroyed.’ 19 Why didn't you do what the Lord ordered? Why did you swoop down on the plunder and do what was evil in the Lord's sight?”
20 “But I did do what the Lord ordered!” Saul replied. “I went and did what the Lord sent me to do. I brought back Agag, king of Amalek, and completely destroyed the Amalekites. 21 The army took sheep and cattle from the plunder, the best of what was consecrated to God, to sacrifice them to the Lord your God in Gilgal.”
22 “Does the Lord prefer burnt offerings and sacrifices, or obedience to what he says?” Samuel asked. “Listen! Obedience is better than sacrifice. Paying attention is more important than offering the fat of rams. 23 Rebellion is as bad as witchcraft, and arrogance is as bad as the sin of idolatry. Because you have rejected the Lord's commands, he has rejected you as king.”
24 “I have sinned,” Saul confessed to Samuel. “I disobeyed the Lord's orders and your instructions, because I was afraid of the people and followed what they said. 25 So please forgive my sin and come back with me, so I can worship the Lord.”
26 But Samuel told him, “I'm not going back with you. You have rejected the Lord's orders, and the Lord has rejected you as king of Israel!”
27 As Samuel turned away to leave, Saul grabbed hold of the hem of his robe, and it ripped.
28 Samuel said to him, “The Lord has ripped the kingdom of Israel away from you today and has given it to your neighbor—someone who is better than you! 29 In addition, the Glory of Israel does not lie or change his mind, for he is not a human being who changes his mind!”
30 “Yes, I have sinned,” Saul replied. “Please honor me now before the elders of my people and before Israel—come back with me, so that I may worship the Lord your God.” 31 So Samuel went back with Saul after all, and Saul worshiped the Lord.
32 Then Samuel said, “Bring me Agag, king of the Amalekites.” Agag came to him confidently, for he thought, “The threat of death of being killed must have passed.”
33 But Samuel said, “In the same way that your sword has made women childless, so too your mother will be childless among women.” Samuel cut Agag to pieces before the Lord at Gilgal.
34 Samuel left for Ramah, and Saul went home to Gibeah of Saul. 35 Until the day of his death, Samuel never visited Saul again. Samuel mourned over Saul, and the Lord regretted he had made Saul the king of Israel.

*15:4 Here spelled Telaim, but thought to be the same town called Telem in Joshua 15:24.