2 Chronicles 6:23-33

23 then listen from heaven, act, and decide which of your servants is right. Condemn the guilty party, repaying them for their conduct, but justify the innocent person, repaying them for their righteousness.
24 If your people Israel are defeated by an enemy because they have sinned against you, but then they change their hearts, give thanks to your name, and ask for mercy in your presence at this temple,
25 then listen from heaven and forgive the sin of your people Israel. Return them to the land you gave to them and their ancestors.
26 When the sky holds back its rain because Israel has sinned against you, but they then pray concerning this place, give thanks to your name, and turn away from their sin because you have punished them for it,
27 then listen from heaven and forgive the sin of your servants, your people Israel. Teach them the best way for them to follow, and send rain on your land that you gave to your people as an inheritance.
28 Whenever there is a famine or plague in the land, or whenever there is blight, mildew, locusts, or grasshoppers, or whenever someone's enemies attack them in their cities, or any plague or illness comes,
29 whatever prayer or petition is made by any individual or by all of your people Israel—because people will recognize their own pain and suffering and spread out their hands toward this temple—
30 then listen from heaven where you live. Forgive, act, and repay each person according to all their conduct because you know their hearts. You alone know the human heart!
31 Do this that they may revere you by following your ways all the days they live on the fertile land that you gave to our ancestors.
32 Listen also to the foreigner who isn't from your people Israel, but who comes from a distant country because of your great reputation, your great power, and your outstretched arm. When they come and pray toward this temple,
33 then listen from heaven where you live, and do everything the foreigner asks. Do this so that all the people of the earth may know your reputation and revere you, as your people Israel do, and recognize that this temple I have built bears your name.