King Jehoshaphat was the 5th King after King David.
Jehoshaphat sought the Lord and walked in the ways of God's commandments. Jehoshaphat took delight in the ways of the Lord and removed the idols out of Judah. He also sent out Levites to teach the people the Bible.
Jehoshaphat did make the mistake of joining forces with the wicked King Ahab in going to war against the people of Ramoth Gilead. The prophet Micaiah warned them not to go. King Ahab died in the war and Jehoshaphat came close to being killed. The prophet Jehu rebuked him for his mistake.
Sometime after this more than three nations came to attack Jehoshaphat at one time. Jehoshaphat set himself to seek the Lord and he called for a fast throughout all the people. When everyone was gathered together Jehoshaphat prayed "O Lord God of our fathers, are you not God in heaven, and in Your hand is there not power and might, so that no one is able to withstand you? We have no power against this great multitude, nor do we know what to do, but our eyes are upon YOU." Then the spirit of the LORD came upon Jahaziel and he said, "listen, thus says the LORD to you: 'do not be afraid nor dismayed because of this great multitude, for the battle is not yours but God's, you will not need to fight in this battle. Position yourselves, stand still and see the salvation of the Lord.
Jehoshaphat and all the people bowed down and worshipped the Lord. Then the Levites got up and praised the LORD GOD with loud voices. Early the next morning they rose up and Jehoshaphat said to the people "believe in the Lord your God, and you shall be established; believe HIS prophets and you shall prosper". Then Jehoshaphat sent the choir out before the army singing "Praise the LORD for His mercy endures forever". As the people went out to war singing and praising the Lord, God sent confusion among their enemies so that they started killing each other. By the time God's people came to the place of battle they found all their enemies lying dead before them, not one had escaped.
If we learn to praise the Lord during difficult times He will see us through them all.
Picture originally found here