I Samuel 15:13-23 NKJV
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.”
So Samuel said:
“Has the LORD as great delight in burnt offerings and sacrifices,
As in obeying the voice of the LORD?
Behold, to obey is better than sacrifice,
And to heed than the fat of rams.
For rebellion is as the sin of witchcraft,
And stubbornness is as iniquity and idolatry.
Because you have rejected the word of the LORD,
He also has rejected you from being king.”
NKJV: New King James Version