2 Chronicles 17:3

And the LORD was with Jehoshaphat, because he walked in the first ways of his father David, and sought not unto Baalim;

The Lord was with Jehoshaphat because of his integrity and personal loyalty to God, shown in walking in the first faithful ways of David his father, seeking the Lord God of his father rather than seeking Baalim, walking in God's commandments, and refusing to follow the idolatrous doings of Israel in the northern kingdom under his contemporary Ahab. From the beginning of his rule he tried to safeguard Judah from those sins and persuade his subjects to take a firm stand against idolatrous practices, yet he did not at once destroy the high places where many of his subjects still worshiped and offered and burned incense. Because of that faithfulness God established the kingdom in his hand.

God gave him riches and abundant honor through the gifts of Judah, and his heart was lifted up in the ways of the Lord. As his reforms proceeded he removed the high places and groves out of Judah. In the third year of his reign he sent princes and Levites with the book of the law to teach the people throughout all the cities of Judah. As a result the fear of the Lord fell on the surrounding kingdoms so that they made no war against Jehoshaphat.

His reign brought a religious revival marked by earnest effort to understand God's requirements and to lessen transgression. Obedience to the Lord always brings favor and faithful practice of right principles carries divine approval, while the Lord is dishonored when stewards set over His flock uphold and approve an evil work. His example teaches that people should not shield those whose disobedience has brought them into trouble, for they may need to bear its consequences rather than be rescued from them. His course is the work God expects from His people today, living at the close of this earth's history, with determined effort to walk in the fear of the Lord and to live lives that convince unbelievers of the power of the grace of Christ.