1 Kings 8:29-39

29 that thy eyes may be open night and day toward this house, the place of which thou hast said, 'My name shall be there,' that thou mayest hearken to the prayer which thy servant offers toward this place.
30 And hearken thou to the supplication of thy servant and of thy people Israel, when they pray toward this place; yea, hear thou in heaven thy dwelling place; and when thou hearest, forgive.
31 "If a man sins against his neighbor and is made to take an oath, and comes and swears his oath before thine altar in this house,
32 then hear thou in heaven, and act, and judge thy servants, condemning the guilty by bringing his conduct upon his own head, and vindicating the righteous by rewarding him according to his righteousness.
33 "When thy people Israel are defeated before the enemy because they have sinned against thee, if they turn again to thee, and acknowledge thy name, and pray and make supplication to thee in this house;
34 then hear thou in heaven, and forgive the sin of thy people Israel, and bring them again to the land which thou gavest to their fathers.
35 "When heaven is shut up and there is no rain because they have sinned against thee, if they pray toward this place, and acknowledge thy name, and turn from their sin, when thou dost afflict them,
36 then hear thou in heaven, and forgive the sin of thy servants, thy people Israel, when thou dost teach them the good way in which they should walk; and grant rain upon thy land, which thou hast given to thy people as an inheritance.
37 "If there is famine in the land, if there is pestilence or blight or mildew or locust or caterpillar; if their enemy besieges them in any of their cities; whatever plague, whatever sickness there is;
38 whatever prayer, whatever supplication is made by any man or by all thy people Israel, each knowing the affliction of his own heart and stretching out his hands toward this house;
39 then hear thou in heaven thy dwelling place, and forgive, and act, and render to each whose heart thou knowest, according to all his ways (for thou, thou only, knowest the hearts of all the children of men);