Blessings and Cursings are Conditional

Included in the Palestinian Covenant is a vital principle of Scripture:
Behold, I set before you this day a blessing and a curse; A blessing, if ye obey the commandments of the LORD your God, which I command you this day: And a curse, if ye will not obey the commandments of the LORD your God, but turn aside out of the way which I command you this day, to go after other gods, which ye have not known. (Deuteronomy 11:26-28)

The Dake Annotated Reference Bible expounds on this principle at length. The following is taken from notes on pages 211 and 226 of the Old Testament:

Blessings and Curses Are Conditional (Dt. 11:27)
All blessings and curses of Scripture are based on obedience and disobedience to the revealed will of God. Such conditions, as well as the curses and blessings of God, are so plain that anyone can understand them and obey. Furthermore, it is clear in Scripture that conditions must be met if blessings are to be received. Continued blessings are conditioned by continued obedience--not just for Israel, but for anyone. It is plainly stated that if Israel failed to do the will of God and gave themselves to backsliding and rebellion, "as the Lord rejoiced over you to do you good, and to multiply you; so the Lord will rejoice over you to destroy you, and to bring you to nought; and ye shall be plucked from off the land whither thou goest to possess it. And the Lord shall scatter thee among all people, from the one end of the earth even unto the other" (Dt. 28:63-68).
This has been literally fulfilled and is still in fulfillment at the present time. Paul uses this example to warn Christians that if God did not spare Israel from cutting them off when they sinned, He would not spare others (Rom. 11). Thus, the truth is that only with continued obedience will God continue to bless anyone. Furthermore, when the righteous turn from righteousness and commit sin, they are cursed again by God (vv. 1-68; Ex. 32:32-33; Lev. 26; Ezek. 18, 33; see Backsliding, p. 237 of O.T., Twenty-one Examples of Beings Fallen From Grace, p. 284 of N.T.

If all free moral agents had obeyed God from their creation until now, there would have been no sin and no curse of any kind in the entire universe. All God's covenants are based on this principle of right and wrong, sin and righteousness. There is no such thing in Scripture as the government of God or man without strict obedience to law as the basis of assurance of continued grace or favor with those in charge of the government. In the event of sins against both God and man there must be punishment to assure continued respect for government and those who govern. It would be a great incentive to rebels if they knew there would be no punishment for rebellion. No government could long endure where there was leniency with those who plot and practice its overthrow. If laws and penalties are revealed to subjects of government and they ignore, reject, and willfully disobey them; or if the government is lax and the rulers too weak to punish rebellion, rebels will take over.
God is not such a ruler, nor does He carry on a weak government. He upholds law and order and metes out punishment and reward as required, thus demonstrating His sovereingnty and moral responsibility. Whether the subjects are holy angels or men, God must demand obedience to all His laws. He is also obligated to punish as His law prescribes, or bless as He has promised--responding accordingly to both disobedience and obedience.

There is no place under law or grace where a man can disobey and be blessed by God. If God failed to punish the sinner just once, it would result in a loss of respect for Him in the hearts of all who are assured of justice if they sin. There can be no partiality with God (Rom. 2:11; Jas. 2:9-10), and there is no excuse for failure in man with the provisions God has made for him to remain in obedience (Mt. 6:24; Rom. 6:16-23; 8:12-14; 2 Cor. 6:9-11; Gal. 5:19-21; Jude 5-7, notes).

Mosaic Authorship of the Pentateuch
Biblical Types
Iniquity of the Fathers