2 Chronicles 20 recounts a joint attack on Judah by the nations of Moab, Ammon, and Edom in the time of King Jehoshaphat. The King declared a fast to the LORD and prayed for his help before the assembled nation.
Then the Spirit of the LORD came upon Jahaziel son of Zechariah, the son of Benaiah, who declared the word of the LORD, "The battle is not yours, but God’s", and concluding, "Do not be afraid; do not be discouraged. Go out to face them tomorrow, and the LORD will be with you."
The next morning, Jehosaphat led his people out, calling them to have faith in the LORD, and leading them in praise. They saw their enemies turn on each other, and returned to Jerusalem in joy. After that, the kingdom of Jehoshaphat was at peace, for his God had given him rest on every side.