If thy people go out to battle against their enemy
In a foreign country, threatening to invade them, or having trespassed on their borders, or some way or other infringed on their liberties and privileges, and so given them just occasion to go to war with them:
whithersoever thou shalt send them;
this case supposes their asking counsel of God, or having a direction and commission from him by a prophet, or some other way, to engage in war with the enemy:
and shall pray unto the Lord toward the city which thou hast chosen,
and toward the house I have built for thy name:
for, notwithstanding the justness of their cause, and having a warrant from God to go to war, yet they were to pray to him for success when at a distance, even in a foreign land, and about to engage the enemy; and this they were to do, turning their faces towards the city of Jerusalem, and the temple there; declaring thereby that their dependence was upon the Lord that dwelt there, and their expectation of victory was only from him.