2 Chronicles 20:3

And Jehoshaphat feared, and set himself to seek the LORD, and proclaimed a fast throughout all Judah.

Judah was in grave danger when a vast invading force threatened invasion. When Jehoshaphat heard of the threatened invasion he feared. He turned that fear into a determined decision to seek the Lord, setting himself to seek Him. In that resolve he proclaimed a fast throughout all Judah.

In response Judah united and gathered together from every place, from their cities and from across the land, to ask help from the Lord. They came together before the Lord in fasting and prayer, including wives and children. They came acknowledging that they had no strength against the danger and fixing their hope on God. They asked Him to confound their enemies and to glorify His own name, showing their shared dependence on Him in the crisis. Their seeking was with unity of purpose and with prayers from unfeigned lips.
When God's people are brought into strait places where decided warfare oppresses them, they are to seek the Lord most earnestly in the same way.