And Jehoshaphat stood in the assembly of Judah and Jerusalem, in the house of the Lord, before the new court, and said, “O Lord, God of our fathers, are you not God in heaven? You rule over all the kingdoms of the nations. In your hand are power and might, so that none is able to withstand you."
2 Chronicles 20:5-6
Jehoshaphat prayed in this way in the face of an imminent invasion. A coalition of armies led by Moab was marching up from the south to attack Jerusalem. Before assembling all his defenses, the king made a bigger strategic move. He publically called the nation to seek God in prayer and fasting, and then set the example himself by praying at the temple for a sovereign God to deliver His people.
Jehoshaphat loved the Lord and knew his place as king was under God. He believed that God was the true King in Jerusalem, and so he prayed to God to honor His covenant with His people. The king was mindful that God had written all of the history of Israel and Judah, and would continue to lead His people.
The prayer at the temple also recognizes God's sovereign hand in control of all the politics of all the nations of the world. God rules over all peoples. No nation, no coalition, no army, no attack can withstand God. And that trust in God was rewarded when the invading coalition turned on itself before the siege and Jerusalem looted the battlefield outside the city walls without raising a sword (see 2 Chronicles 20:23). The faith of the king and the faithfulness of God met mightily in salvation for Judah.