2 Chronicles 19 &20
Jehoshaphat: He appointed judges in the land, in each of the fortified cities of Judah. He told them, “Consider carefully what you do, because you are not judging for mere mortals but for the Lord, who is with you whenever you give a verdict. Now let the fear of the Lord be on you. Judge carefully, for with the Lord our God there is no injustice or partiality or bribery.”
After this, the Moabites and Ammonites with some of the Meunites[a] came to wage war against Jehoshaphat.
Alarmed, Jehoshaphat resolved to inquire of the Lord, and he proclaimed a fast for all Judah. The people of Judah came together to seek help from the Lord; indeed, they came from every town in Judah to seek him. Then Jehoshaphat stood up in the assembly of Judah and Jerusalem at the temple of the Lord in the front of the new courtyard and said:
Then the Spirit of the Lord came on Jahaziel son of Zechariah, the son of Benaiah, the son of Jeiel, the son of Mattaniah, a Levite and descendant of Asaph, as he stood in the assembly. He said: “Listen, King Jehoshaphat and all who live in Judah and Jerusalem! This is what the Lord says to you: ‘Do not be afraid or discouraged because of this vast army. For the battle is not yours, but God’s. Tomorrow march down against them. They will be climbing up by the Pass of Ziz, and you will find them at the end of the gorge in the Desert of Jeruel. You will not have to fight this battle. Take up your positions; stand firm and see the deliverance the Lord will give you, Judah and Jerusalem. Do not be afraid; do not be discouraged. Go out to face them tomorrow, and the Lord will be with you.
After consulting the people, Jehoshaphat appointed men to sing to the Lord and to praise him for the splendor of his[c] holiness as they went out at the head of the army, saying: “Give thanks to the Lord, for his love endures forever.”
As they began to sing and praise, the Lord set ambushes against the men of Ammon and Moab and Mount Seir who were invading Judah, and they were defeated. The Ammonites and Moabites rose up against the men from Mount Seir to destroy and annihilate them. After they finished slaughtering the men from Seir, they helped to destroy one another.
The fear of God came on all the surrounding kingdoms when they heard how the Lord had fought against the enemies of Israel. And the kingdom of Jehoshaphat was at peace, for his God had given him rest on every side.
Later, Jehoshaphat king of Judah made an alliance with Ahaziah king of Israel, whose ways were wicked. He agreed with him to construct a fleet of trading ships. After these were built at Ezion Geber, Eliezer son of Dodavahu of Mareshah prophesied against Jehoshaphat, saying, “Because you have made an alliance with Ahaziah, the Lord will destroy what you have made.” The ships were wrecked and were not able to set sail to trade.
Why?
The King Jehoshaphat relied on the Lord and prayed to the Lord for help with the whole of Juda, so the Lord helped Judah defeat the enemies.
Jehoshaphat made an alliance with Ahaziah, letting him lose much effort and blessing from the Lord.
For the battle is not ours, but God's. Even now there are many wars in our world. Keep in mind it is in the hands of the Lord.
How?
Only those who trust in the Lord and obey God's command can achieve peace and life.