In the thirty-sixth year of Asa, Israel's King Baasha went to war against Judah. He built Ramah in order to deny anyone's access-going or coming-to Judah's King Asa.
References for 2 Chronicles 16:1
So Asa brought out the silver and gold from the treasuries of the Lord's temple and the royal palace and sent it to Aram's King Ben-hadad, who lived in Damascus, saying,
"There's a treaty between me and you, between my father and your father. Look, I have sent you silver and gold. Go break your treaty with Israel's King Baasha so that he will withdraw from me."
Ben-hadad listened to King Asa and sent the commanders of his armies to the cities of Israel. They attacked Ijon, Dan, Abel-maim, and all the storage cities of Naphtali.
References for 2 Chronicles 16:4
When Baasha heard [about it], he quit building Ramah and stopped his work.
Then King Asa brought all Judah, and they carried away the stones of Ramah and the timbers Baasha had built it with. Then he built Geba and Mizpah with them.
References for 2 Chronicles 16:6