"Do not say in your heart, after the LORD your God has thrust them out before you, 'It is because of my righteousness that the LORD has brought me in to possess this land,' whereas it is because of the wickedness of these nations that the LORD is driving them out before you. (5) Not because of your righteousness or the uprightness of your heart are you going in to possess their land, but because of the wickedness of these nations the LORD your God is driving them out from before you, and that he may confirm the word that the LORD swore to your fathers, to Abraham, to Isaac, and to Jacob. (6) "Know, therefore, that the LORD your God is not giving you this good land to possess because of your righteousness, for you are a stubborn people.
Deuteronomy 9:4-6, ESV
Finally, Moses is giving his farewell speech as the twelve tribes of Israel gear up for a full-scale military invasion of the land of Canaan. Most don't remember that just forty years ago the whole population endured slavery under the Egyptian pharaoh.
Few if any suspect that the curses and warnings from God will be played out again and again after the nation succumbs to its wicked inclinations towards idolatry and sexual immorality. But Moses seems to know. He may have a flicker of hope that the nation will follow the correct path, but his summation of the character of this people reflects over forty years of first-hand experience with them: "you are a stubborn people."
Israel's vanity and self-righteousness is much like my own, and as the rest of the Old and New Testaments show, it is a recurring nightmare. But the Word of the Lord does not permit such vanity and self-righteousness to have the final say. God wipes out the nations of Canaan because of their sin, not Israel's righteousness. Because if truth be told, Israel is just as wicked.
Remember and do not forget how you provoked the LORD your God to wrath in the wilderness. From the day you came out of the land of Egypt until you came to this place, you have been rebellious against the LORD. (8) Even at Horeb you provoked the LORD to wrath, and the LORD was so angry with you that he was ready to destroy you.
You have been rebellious against the LORD from the day that I knew you.
One of the keys to exposing our self-righteous attitudes is to remember our sin. Sin is rebellion, a willful provocation of the Most High God. Verse after verse Moses identifies and condemns the sin of Israel. Even after having seen the mighty right hand of God working in their favor the Israelites rebelled against Him.
Even in Jesus' day the Pharisees embodied the attitude Moses here condemns. Here is what Christ says about them in Matthew 23:29-31,
"Woe to you, scribes and Pharisees, hypocrites! For you build the tombs of the prophets and decorate the monuments of the righteous, (30) saying, 'If we had lived in the days of our fathers, we would not have taken part with them in shedding the blood of the prophets.' (31) Thus you witness against yourselves that you are sons of those who murdered the prophets.
Unless we take personal responsibility for our sin and recognize it as rebellion against a holy God, we have not yet begun to realize the gravity of our sin.