In context
20But Amaziah would not listen, for this came from God, so that they might be handed over, because they had sought out the gods of Edom. 21So Joash king of Israel marched up, and he and Amaziah king of Judah looked each other in the face at Beth-shemesh, which belongs to Judah. 22Judah was routed before Israel, and every man fled to his tent. 23Amaziah king of Judah, son of Joash, son of Jehoahaz, was captured at Beth-shemesh by Joash king of Israel, who brought him to Jerusalem and broke down the wall of Jerusalem from the Gate of Ephraim to the Corner Gate — four hundred cubits. 24He took all the gold and silver and all the vessels found in the house of God with Obed-edom, together with the treasures of the king’s house and hostages besides, and he returned to Samaria.
