Samuel also said to Saul, “The Lord sent me to anoint you king over His people, over Israel. Now therefore, heed the voice of the words of the Lord. Thus says the Lord of hosts: ‘I will punish Amalek for what he did to Israel, how he ambushed him on the way when he came up from Egypt. Now go and attack Amalek, and utterly destroy all that they have, and do not spare them. But kill both man and woman, infant and nursing child, ox and sheep, camel and donkey.’”
So Saul gathered the people together and numbered them in Telaim, two hundred thousand foot soldiers and ten thousand men of Judah. And Saul came to a city of Amalek, and lay in wait in the valley.
Then Saul said to the Kenites, “Go, depart, get down from among the Amalekites, lest I destroy you with them. For you showed kindness to all the children of Israel when they came up out of Egypt.” So the Kenites departed from among the Amalekites. And Saul attacked the Amalekites, from Havilah all the way to Shur, which is east of Egypt. He also took Agag king of the Amalekites alive, and utterly destroyed all the people with the edge of the sword. But Saul and the people spared Agag and the best of the sheep, the oxen, the fatlings, the lambs, and all that wasgood, and were unwilling to utterly destroy them. But everything despised and worthless, that they utterly destroyed.
Now the word of the Lord came to Samuel, saying, “I greatly regret that I have set up Saul as king, for he has turned back from following Me, and has not performed My commandments.” And it grieved Samuel, and he cried out to the Lord all night. So when Samuel rose early in the morning to meet Saul, it was told Samuel, saying, “Saul went to Carmel, and indeed, he set up a monument for himself; and he has gone on around, passed by, and gone down to Gilgal.” Then Samuel went to Saul, and Saul said to him, “Blessed are you of the Lord! I have performed the commandment of the Lord.”
But Samuel said, “What then is this bleating of the sheep in my ears, and the lowing of the oxen which I hear?”
And Saul said, “They have brought them from the Amalekites; for the people spared the best of the sheep and the oxen, to sacrifice to the Lord your God; and the rest we have utterly destroyed.”
Then Samuel said to Saul, “Be quiet! And I will tell you what the Lord said to me last night.”
And he said to him, “Speak on.”
So Samuel said, “When you were little in your own eyes, were you not head of the tribes of Israel? And did not the Lord anoint you king over Israel? Now the Lord sent you on a mission, and said, ‘Go, and utterly destroy the sinners, the Amalekites, and fight against them until they are consumed.’ Why then did you not obey the voice of the Lord? Why did you swoop down on the spoil, and do evil in the sight of the Lord?”
And Saul said to Samuel, “But I have obeyed the voice of the Lord, and gone on the mission on which the Lord sent me, and brought back Agag king of Amalek; I have utterly destroyed the Amalekites. But the people took of the plunder, sheep and oxen, the best of the things which should have been utterly destroyed, to sacrifice to the Lord your God in Gilgal.”
-1 Samuel 15:1-21