1 Kings 8:35
ESV
"When heaven is shut up and there is no rain because they have sinned against you, if they pray toward this place and acknowledge your name and turn from their sin, when you afflict them,
NIV
"When the heavens are shut up and there is no rain because your people have sinned against you, and when they pray toward this place and give praise to your name and turn from their sin because you have afflicted them,
NASB
When the heavens are shut up and there is no rain because they have sinned against You, and they pray toward this place and praise Your name, and turn from their sin when You afflict them,
CSB
When the skies are shut and there is no rain, because they have sinned against you, and they pray toward this place and praise your name, and they turn from their sins because you are afflicting them,
NLT
'If the skies are shut up and there is no rain because your people have sinned against you, and if they pray toward this Temple and acknowledge your name and turn from their sins because you have punished them,
KJV
When heaven is shut up, and there is no rain, because they have sinned against thee; if they pray toward this place, and confess thy name, and turn from their sin, when thou afflictest them:
NKJV
“When the heavens are shut up and there is no rain because they have sinned against You, when they pray toward this place and confess Your name, and turn from their sin because You afflict them,
What does 1 Kings 8:35 mean?
First Kings 8:35–36 is the second example Solomon gives of God punishing Israel for their corporate sin. In verse 33, Solomon talks about the punishment of war and captivity. Now, he talks about drought.In the list of blessings and judgments in Leviticus 26, the first judgment is a wasting disease so severe that men can't defend the crops. The second is defeat in war. The third is drought (Leviticus 26:14–20). God said, "…and I will break the pride of your power, and I will make your heavens like iron and your earth like bronze" (Leviticus 26:19).
God will use this punishment in the northern kingdom of Israel when Ahab is king. Through the Holy Spirit, the prophet Elijah prophesies that there will be no rain or even dew (1 Kings 17:1). After three years, God tells Elijah it will rain again. To ensure Ahab and the Israelites know that Yahweh (Exodus 3:15) is sending the rain, Elijah challenges the priests of Baal to a sacrificial competition: the deity who sends fire upon the sacrifice first wins. Of course, Baal can't light the wood because Baal doesn't exist. But Yahweh does (1 Kings 18).
The psalmist affirms God's power, saying God "turns rivers into a desert…a fruitful land into a salty waste, because of the evil of its inhabitants" (Psalm 107:33–34). But also, "He turns a desert into pools of water" (Psalm 107:35).
God doesn't stop the drought because Ahab repents. Ahab won't look to the temple and beg forgiveness of the Lord. The fact that God lifts the drought anyway shows His mercy and long-suffering kindness.