II Kings 10,11
/There is not a bloodier portion in the records of the kings of Israel than these chapters. 2 Kings 10:1-17 records the killing of the seventy sons of Ahab under the leadership of Jehu. Verses 18-27 record Jehu’s effort to eradicate Baal worship from the land. In both of these, Jehu was being obedient. For the obedience, God told him his sons for four generations would rule Israel. But after being obedient, Jehu (v31) “was not careful to walk in the Law of the Lord.” In fact, he himself worshiped idols. And so God removed His promise.
God can, and does use “less-than-perfect” people, but not even outward obedience takes the place of a heart after God.