1 Kings 8:41-51

41 "Also the foreigner who does not belong to your people Isra'el - when he comes from a distant country because of your reputation
42 (for they will hear of your great reputation, your mighty hand and your outstretched arm), when he comes and prays toward this house;
43 then hear in heaven where you live, and act in accordance with everything about which the foreigner is calling to you; so that all the peoples of the earth will know your name and fear you, as does your people Isra'el, and so that they will know that this house which I have built bears your name.
44 "If your people go out to fight against their enemy, no matter by which way you send them, and they pray to ADONAI toward the city you chose, toward the house I built for your name;
45 then, in heaven, hear their prayer and plea, and uphold their cause.
46 "If they sin against you - for there is no one who doesn't sin - and you are angry with them and hand them over to the enemy, so that they carry them off captive to the land of their enemy, whether far away or nearby;
47 then, if they come to their senses in the land where they have been carried away captive, turn back and make their plea to you in the land of those who carried them off captive, saying, 'We sinned, we acted wrongly, we behaved wickedly,'
48 if, in the land of their enemies who carried them off captive, they return to you with all their heart and being and pray to you toward their own land, which you gave to their ancestors, toward the city you chose and toward the house I have built for your name;
49 then, in heaven where you live, hear their prayer and plea, uphold their cause,
50 and forgive your people who have sinned against you - forgive their transgressions which they have committed against you, and give them compassion in the sight of their captors, so that they will show compassion toward them;
51 for they are your people, your inheritance, whom you brought out of Egypt, out of the flames of the iron furnace.