1 Samuel 13:13-14 NIV

13 "You acted foolishly,1" Samuel said. "You have not kept2 the command the LORD your God gave you; if you had, he would have established your kingdom over Israel for all time.3

References for 1 Samuel 13:13

14 But now your kingdom4 will not endure; the LORD has sought out a man after his own heart5 and appointed6 him leader7 of his people, because you have not kept8 the LORD's command."