2 Chronicles 6:26

When the heaven is shut up, and there is no rain, because they have sinned against thee; yet if they pray toward this place, and confess thy name, and turn from their sin, when thou dost afflict them;

This petition belongs to Solomon's prayer after the temple was erected, at its dedication, and stands within the account of his life and the history following his reign. It was spoken aloud as public prayer while kneeling on a brazen scaffold in the presence and hearing of Israel, and its words are preserved in the Bible, thus illustrating vocal prayer offered in public. It was offered kneeling with hands lifted toward heaven while the congregation bowed with faces to the ground.

Shut heaven means no rain comes because Israel has sinned against God, and He has afflicted them with drought. If they then pray toward this place, the temple, and confess His name and turn from their sin when afflicted, He is asked to hear from heaven. He is asked to forgive the sin of His servants and His people Israel, to teach them the good and right way in which they should walk and live, and to send rain again upon the land He gave them for an inheritance.

After the prayer ended, fire was sent from heaven that consumed the burnt offering, and the Lord appeared by night saying the prayer had been heard. The prayer shows that God meets His people by His Spirit when they gather at the temple, yet He is not confined to the temple, so His people may worship Him wherever they are.