The conditions for blessing and cursing are directly linked to our obedience or disobedience. God clearly stipulates this to Solomon after the dedication of the temple:
“11 Thus Solomon finished the house of the Lord and the king’s palace, and successfully completed all that he had planned on doing in the house of the Lord and in his palace. 12 Then the Lord appeared to Solomon at night and said to him, “I have heard your prayer and have chosen this place for Myself as a house of sacrifice. 13 If I shut up the heavens so that there is no rain, or if I command the locust to devour the land, or if I send pestilence among My people, 14 and My people who are called by My name humble themselves and pray and seek My face and turn from their wicked ways, then I will hear from heaven, will forgive their sin and will heal their land. 15 Now My eyes will be open and My ears attentive to the prayer offered in this place. 16 For now I have chosen and consecrated this house that My name may be there forever, and My eyes and My heart will be there perpetually. 17 As for you, if you walk before Me as your father David walked, even to do according to all that I have commanded you, and will keep My statutes and My ordinances, 18 then I will establish your royal throne as I covenanted with your father David, saying, ‘You shall not lack a man to be ruler in Israel.’ 19 “But if you turn away and forsake My statutes and My commandments which I have set before you, and go and serve other gods and worship them, 20 then I will uproot you from My land which I have given you, and this house which I have consecrated for My name I will cast out of My sight and I will make it a proverb and a byword among all peoples. 21 As for this house, which was exalted, everyone who passes by it will be astonished and say, ‘Why has the Lord done thus to this land and to this house?’ 22 And they will say, ‘Because they forsook the Lord, the God of their fathers who brought them from the land of Egypt, and they adopted other gods and worshiped them and served them; therefore He has brought all this adversity on them.” (2 Chron.7:11-22)
And yet, what we see in King David’s life are glimpses of the new covenant where God’s mercy to the king seemed to be a travesty of justice (E.g., Uriah and Bathsheba). If our hope was not on the heart of flesh God would put into those He chose, we would be in utter despair:
“Behold, days are coming,” declares the Lord, “when I will make a new covenant with the house of Israel and with the house of Judah, 32 not like the covenant which I made with their fathers in the day I took them by the hand to bring them out of the land of Egypt, My covenant which they broke, although I was a husband to them,” declares the Lord.33 “But this is the covenant which I will make with the house of Israel after those days,” declares the Lord, “I will put My law within them and on their heart I will write it; and I will be their God, and they shall be My people. 34 They will not teach again, each man his neighbor and each man his brother, saying, ‘Know the Lord,’ for they will all know Me, from the least of them to the greatest of them,” declares the Lord, “for I will forgive their iniquity, and their sin I will remember no more.” (Jer.31:31-34)
And yet, this new covenant demands the holiness of God in those professing to be believers, in order to warrant its genuineness. That is, in the new covenant God brings dead sinners to life through Christ’s work on Calvary’s cross. This new life is God’s life which necessarily produces the fruit of holiness in his children. That’s the power of the gospel. That’s what Jeremiah prophesied would take place, and that’s what Christ accomplished for His own. The genuine believer does have a sin problem, but in Christ it can no longer prevent us from loving God and neighbor as ourselves. That is, where once before Christ all we could do was sin, now after being in Christ through new birth, we actually have a choice of whether or not we will obey. May we choose life always.