14 And the Spirit of the Lord came upon Jahaziel the son of Zechariah, son of Benaiah, son of Jeiel, son of Mattaniah, a Levite of the sons of Asaph, in the midst of the assembly. 15 And he said, “Listen, all Judah and inhabitants of Jerusalem and King Jehoshaphat: Thus says the Lord to you, ‘Do not be afraid and do not be dismayed at this great horde, for the battle is not yours but God's. 16 Tomorrow go down against them. Behold, they will come up by the ascent of Ziz. You will find them at the end of the valley, east of the wilderness of Jeruel. 17 You will not need to fight in this battle. Stand firm, hold your position, and see the salvation of the Lord on your behalf, O Judah and Jerusalem.’ Do not be afraid and do not be dismayed. Tomorrow go out against them, and the Lord will be with you.”
18 Then Jehoshaphat bowed his head with his face to the ground, and all Judah and the inhabitants of Jerusalem fell down before the Lord, worshiping the Lord. 19 And the Levites, of the Kohathites and the Korahites, stood up to praise the Lord, the God of Israel, with a very loud voice.
20 And they rose early in the morning and went out into the wilderness of Tekoa. And when they went out, Jehoshaphat stood and said, “Hear me, Judah and inhabitants of Jerusalem! Believe in the Lord your God, and you will be established; believe his prophets, and you will succeed.” 21 And when he had taken counsel with the people, he appointed those who were to sing to the Lord and praise him in holy attire, as they went before the army, and say,
“Give thanks to the Lord,
for his steadfast love endures forever.”
22 And when they began to sing and praise, the Lord set an ambush against the men of Ammon, Moab, and Mount Seir, who had come against Judah, so that they were routed. 23 For the men of Ammon and Moab rose against the inhabitants of Mount Seir, devoting them to destruction, and when they had made an end of the inhabitants of Seir, they all helped to destroy one another.
24 When Judah came to the watchtower of the wilderness, they looked toward the horde, and behold, there were dead bodies lying on the ground; none had escaped. 25 When Jehoshaphat and his people came to take their spoil, they found among them, in great numbers, goods, clothing, and precious things, which they took for themselves until they could carry no more. They were three days in taking the spoil, it was so much. 26 On the fourth day they assembled in the Valley of Beracah, for there they blessed the Lord. Therefore the name of that place has been called the Valley of Beracah to this day. 27 Then they returned, every man of Judah and Jerusalem, and Jehoshaphat at their head, returning to Jerusalem with joy, for the Lord had made them rejoice over their enemies. 28 They came to Jerusalem with harps and lyres and trumpets, to the house of the Lord. 29 And the fear of God came on all the kingdoms of the countries when they heard that the Lord had fought against the enemies of Israel. 30 So the realm of Jehoshaphat was quiet, for his God gave him rest all around. (ESV)