The LORD was with Jehoshaphat because he followed the example set during his ancestor David's preliminary years by not pursuing the Baals.