1 Samuel 15:4-14

4 And Saul sent for the people and had them numbered in Telaim, two hundred thousand footmen and ten thousand men of Judah.
5 And Saul came to the town of Amalek, and took up his position in the valley secretly.
6 And Saul said to the Kenites, Go away, take yourselves out from among the Amalekites, or destruction will overtake you with them: for you were kind to the children of Israel when they came out of Egypt. So the Kenites went away from among the Amalekites.
7 And Saul made an attack on the Amalekites from Havilah on the road to Shur, which is before Egypt.
8 He took Agag, king of the Amalekites, prisoner, and put all the people to the sword without mercy.
9 But Saul and the people did not put Agag to death, and they kept the best of the sheep and the oxen and the fat beasts and the lambs, and whatever was good, not desiring to put them to the curse: but everything which was bad and of no use they put to the curse.
10 Then the Lord said to Samuel,
11 It is no longer my pleasure for Saul to be king; for he is turned back from going in my ways, and has not done my orders. And Samuel was very sad, crying to the Lord in prayer all night.
12 And early in the morning he got up and went to Saul; and word was given to Samuel that Saul had come to Carmel and put up a pillar, and had gone from there down to Gilgal.
13 And Samuel came to Saul; and Saul said to him, May the blessing of the Lord be with you: I have done what was ordered by the Lord.
14 And Samuel said, What then is this sound of the crying of sheep and the noise of oxen which comes to my ears?