Jehoshaphat, king of Judah, joined in affinity both with ungodly Ahab and his son Ahaziah. Remember that Ahab's house was a murderous one. These were political ventures, which were thought would benefit and enrich their respective kingdoms with peace and prosperity. It wasn't that Jehoshaphat was joining in joint worship or anything that was overtly religious. It was a purely political, commercial union, designed to advance the peace and prosperity both of the northern and southern kingdoms in Israel.
Again God made His mind known on this type of political union. This time it was Eliezer the son of Dodavah of Mareshah who prophesied against Jehoshaphat, saying: Because thou hast joined thyself with Ahaziah, the LORD hath broken thy works, 2 Chronicles 20:37. The ships were broken, that they were not able to go to Tarshish, Jehoshaphat made ships of Tharshish to go to Ophir for gold: but they went not; for the ships were broken at Eziongeber, 1 Kings 22:48.