1 Samuel 15:23

For rebellion is like the sin of divination, and arrogance is like the wickedness of idolatry. Because you have rejected the word of the Lord, He has rejected you as king.”
BSB · Berean Standard Bible
For rebellion is as the sin of witchcraft, and stubbornness is as iniquity and idolatry. Because thou hast rejected the word of the Lord, he hath also rejected thee from being king.

Note witchcraft: Heb. divination

KJV · King James Version
For rebellion is as the sin of witchcraft, and stubbornness is as idolatry and teraphim. Because you have rejected the Lord’s word, he has also rejected you from being king.”

Note teraphim were household idols that may have been associated with inheritance rights to the household property.

WEB · World English Bible
For rebellion is as the sin of witchcraft, and stubbornness is as idolatry and teraphim. Because thou hast rejected the word of Jehovah, he hath also rejected thee from being king.
ASV · American Standard Version

Related passages

From the Treasury of Scripture Knowledge, grouped by the word they explain.

rebellion
1 Samuel 12:14, 15; Numbers 14:9; Deuteronomy 9:7, 24; Joshua 22:16–19; Job 34:37; Psalm 107:11; Jeremiah 28:16; Jeremiah 29:32; Ezekiel 2:5–8
witchcraft
Heb. divination.
Exodus 22:18; Leviticus 20:6, 27; Deuteronomy 18:10, 11; Isaiah 8:19; Isaiah 19:3; Revelation 22:15
stubbornness
2 Corinthians 6:16; Galatians 5:20; Revelation 21:8
thou hast rejected
1 Samuel 2:30; 1 Samuel 13:14; 1 Samuel 16:1; 2 Kings 17:15–20; 1 Chronicles 28:9