When Asa had been ruling Judah for almost 36 years, King Baasha of Israel went with his army to attack Judah. They captured the town of Ramah north of Jerusalem and started to build a wall around it, in order to prevent any people from entering or leaving the area in Judah that was ruled by King Asa because the only road into Judah from Israel went through Ramah.