In the thirty-eighth year of the reign of Asa, Baasha king of Israel came up against Judah and built Ramah, so that no one could go out or come in to Asa king of Judah. Then Asa brought silver and gold from the treasuries of the house of the Lord and the king’s house. He sent them to the son of Hadad the king of Syria, who dwelt in Damascus, saying, “Let there be a treaty between you and me, as there was between my father and your father. Here, I have sent you silver and gold. Come and drive away Baasha king of Israel so that he will withdraw from me.”
So the son of Hadad heeded King Asa, and sent the captains of his armies against the cities of Israel. They attacked Ijon, Dan, Abel Maim, and all the areas around Naphtali. Now when Baasha heard it, he stopped building Ramah and ceased his work. Then King Asa took all of Judah, and they carried away the stones and timber of Ramah which Baasha had used for building. With them he built Geba and Mizpah.
And at that time, Hanani the prophet came to Asa king of Judah and said to him, “Because you relied on the king of Syria and did not rely on the Lord your God, therefore the army of the king of Syria escaped from your hand. Were not the Ethiopians and the Lubim a large and courageous army with a great many chariots and horsemen? Yet, because you relied on the Lord, He delivered them into your hand. For the eyes of the Lord look over the whole earth and strengthen every heart that is loyal to Him. In this you did foolishly, and from now on you shall have wars.”
(2 Chronicles 16:1-9)