2 Chronicles 6:29-39

29 what prayer and supplication soever be made by any man, or by all thy people Israel, who shall know every man his own plague and his own sorrow, and shall spread forth his hands toward this house:
30 then hear thou from heaven thy dwelling-place and forgive, and render unto every man according to all his ways, whose heart thou knowest; (for thou, even thou only, knowest the hearts of the children of men;)
31 that they may fear thee, to walk in thy ways, so long as they live in the land which thou gavest unto our fathers.
32 Moreover concerning the foreigner, that is not of thy people Israel, when he shall come from a far country for thy great name's sake, and thy mighty hand, and thine outstretched arm; when they shall come and pray toward this house:
33 then hear thou from heaven, even from thy dwelling-place, and do according to all that the foreigner calleth to thee for; that all the peoples of the earth may know thy name, and fear thee, as doth thy people Israel, and that they may know that this house which I have built is called by thy name.
34 If thy people go out to battle against their enemies, by whatsoever way thou shalt send them, and they pray unto thee toward this city which thou hast chosen, and the house which I have built for thy name;
35 then hear thou from heaven their prayer and their supplication, and maintain their cause.
36 If they sin against thee (for there is no man that sinneth not), and thou be angry with them, and deliver them to the enemy, so that they carry them away captive unto a land far off or near;
37 yet if they shall bethink themselves in the land whither they are carried captive, and turn again, and make supplication unto thee in the land of their captivity, saying, We have sinned, we have done perversely, and have dealt wickedly;
38 if they return unto thee with all their heart and with all their soul in the land of their captivity, whither they have carried them captive, and pray toward their land, which thou gavest unto their fathers, and the city which thou hast chosen, and toward the house which I have built for thy name:
39 then hear thou from heaven, even from thy dwelling-place, their prayer and their supplications, and maintain their cause, and forgive thy people who have sinned against thee.
The American Standard Version is in the public domain.