Joshua 24:9
Then Balak the son of Zippor, king of Moab, arose and warred against Israel, and sent and called Balaam the son of Beor to curse you: Then Balak the son of Zippor, king of Moab, arose and warred against Israel, and sent and called Balaam the son of Beor to curse you:
This verse belongs to Joshua's closing work as he laid down his leadership before his death, when the infirmities of age were upon him and he was about to lay his responsibilities upon the representative men of the nation. He called the tribes together to recount their history since they were called out as the people of God, matching what Moses did just before his death in calling Israel together to rehearse their past experience, trials, failures, and warnings. It was spoken at Shechem, where the tribes assembled in obedience to his summons. That spot was full of sacred associations that carried minds back to God's covenant with Abraham and Jacob and to Israel's own solemn vows upon entering Canaan, with Mount Ebal and Mount Gerizim standing as silent witnesses to vows then renewed in the presence of their dying leader.
As part of that address Joshua reviewed God's works, providence, blessings, mercies, and dealings with Israel, reminding the people that God had given them a land for which they had not labored. On every side they were surrounded by evidences of what God had wrought for them, and the account of Balak's hostility belongs to this review. Within that review the verse recalls that Balak the son of Zippor, king of Moab, warred against Israel and sent and called Balaam the son of Beor to curse them. The attempted curse did not prevail, for God would not listen to Balaam but continued to bless Israel, showing His protection and mercy toward His people.
The review was given to strengthen the faith of God's people by recalling God's providence, and to awaken gratitude for that providence and humility over the people's failures, disobedience, and neglect of God's revealed will. Joined to the review is a warning against idolatry and close ties with idolaters, including intermarriage, because these lead to corruption and ruin, so that departing from God brings desolation, and God is faithful both to His promises and to His warnings. Joshua's example calls those who have had experience in God's dealings to stand as he did and recount much more of what the Lord has done in the past, telling it again and again to those who have not had that experience. Doing so blesses those who tell it and blesses new workers by molding them to carry the work forward in the same humble, self-sacrificing spirit, while losing sight of what the Lord did in the past means losing sight of His present working on their behalf.