23:1 A long time afterward, when the Lord had given rest to Israel from all their surrounding enemies, and Joshua was old and well advanced in years, 2 Joshua summoned all Israel, its elders and heads, its judges and officers, and said to them, “I am now old and well advanced in years. 3 And you have seen all that the Lord your God has done to all these nations for your sake, for it is the Lord your God who has fought for you. 4 Behold, I have allotted to you as an inheritance for your tribes those nations that remain, along with all the nations that I have already cut off, from the Jordan to the Great Sea in the west. 5 The Lord your God will push them back before you and drive them out of your sight. And you shall possess their land, just as the Lord your God promised you. 6 Therefore, be very strong to keep and to do all that is written in the Book of the Law of Moses, turning aside from it neither to the right hand nor to the left, 7 that you may not mix with these nations remaining among you or make mention of the names of their gods or swear by them or serve them or bow down to them, 8 but you shall cling to the Lord your God just as you have done to this day. 9 For the Lord has driven out before you great and strong nations. And as for you, no man has been able to stand before you to this day. 10 One man of you puts to flight a thousand, since it is the Lord your God who fights for you, just as he promised you. 11 Be very careful, therefore, to love the Lord your God. 12 For if you turn back and cling to the remnant of these nations remaining among you and make marriages with them, so that you associate with them and they with you, 13 know for certain that the Lord your God will no longer drive out these nations before you, but they shall be a snare and a trap for you, a whip on your sides and thorns in your eyes, until you perish from off this good ground that the Lord your God has given you.
14 “And now I am about to go the way of all the earth, and you know in your hearts and souls, all of you, that not one word has failed of all the good things that the Lord your God promised concerning you. All have come to pass for you; not one of them has failed. 15 But just as all the good things that the Lord your God promised concerning you have been fulfilled for you, so the Lord will bring upon you all the evil things, until he has destroyed you from off this good land that the Lord your God has given you, 16 if you transgress the covenant of the Lord your God, which he commanded you, and go and serve other gods and bow down to them. Then the anger of the Lord will be kindled against you, and you shall perish quickly from off the good land that he has given to you.”
24:1 Joshua gathered all the tribes of Israel to Shechem and summoned the elders, the heads, the judges, and the officers of Israel. And they presented themselves before God. 2 And Joshua said to all the people, “Thus says the Lord, the God of Israel, ‘Long ago, your fathers lived beyond the Euphrates, Terah, the father of Abraham and of Nahor; and they served other gods. 3 Then I took your father Abraham from beyond the River and led him through all the land of Canaan, and made his offspring many. I gave him Isaac. 4 And to Isaac I gave Jacob and Esau. And I gave Esau the hill country of Seir to possess, but Jacob and his children went down to Egypt. 5 And I sent Moses and Aaron, and I plagued Egypt with what I did in the midst of it, and afterward I brought you out.
6 “‘Then I brought your fathers out of Egypt, and you came to the sea. And the Egyptians pursued your fathers with chariots and horsemen to the Red Sea. 7 And when they cried to the Lord, he put darkness between you and the Egyptians and made the sea come upon them and cover them; and your eyes saw what I did in Egypt. And you lived in the wilderness a long time. 8 Then I brought you to the land of the Amorites, who lived on the other side of the Jordan. They fought with you, and I gave them into your hand, and you took possession of their land, and I destroyed them before you. 9 Then Balak the son of Zippor, king of Moab, arose and fought against Israel. And he sent and invited Balaam the son of Beor to curse you, 10 but I would not listen to Balaam. Indeed, he blessed you. So I delivered you out of his hand. 11 And you went over the Jordan and came to Jericho, and the leaders of Jericho fought against you, and also the Amorites, the Perizzites, the Canaanites, the Hittites, the Girgashites, the Hivites, and the Jebusites. And I gave them into your hand. 12 And I sent the hornet before you, which drove them out before you, the two kings of the Amorites; it was not by your sword or by your bow. 13 I gave you a land on which you had not labored and cities that you had not built, and you dwell in them. You eat the fruit of vineyards and olive orchards that you did not plant.’
14 “Now therefore fear the Lord and serve him in sincerity and in faithfulness. Put away the gods that your fathers served beyond the River and in Egypt, and serve the Lord. 15 And if it is evil in your eyes to serve the Lord, choose this day whom you will serve, whether the gods your fathers served in the region beyond the River, or the gods of the Amorites in whose land you dwell. But as for me and my house, we will serve the Lord.”
16 Then the people answered, “Far be it from us that we should forsake the Lord to serve other gods, 17 for it is the Lord our God who brought us and our fathers up from the land of Egypt, out of the house of slavery, and who did those great signs in our sight and preserved us in all the way that we went, and among all the peoples through whom we passed. 18 And the Lord drove out before us all the peoples, the Amorites who lived in the land. Therefore we also will serve the Lord, for he is our God.”
19 But Joshua said to the people, “You are not able to serve the Lord, for he is a holy God. He is a jealous God; he will not forgive your transgressions or your sins. 20 If you forsake the Lord and serve foreign gods, then he will turn and do you harm and consume you, after having done you good.” 21 And the people said to Joshua, “No, but we will serve the Lord.” 22 Then Joshua said to the people, “You are witnesses against yourselves that you have chosen the Lord, to serve him.” And they said, “We are witnesses.” 23 He said, “Then put away the foreign gods that are among you, and incline your heart to the Lord, the God of Israel.” 24 And the people said to Joshua, “The Lord our God we will serve, and his voice we will obey.” 25 So Joshua made a covenant with the people that day, and put in place statutes and rules for them at Shechem. 26 And Joshua wrote these words in the Book of the Law of God. And he took a large stone and set it up there under the terebinth that was by the sanctuary of the Lord. 27 And Joshua said to all the people, “Behold, this stone shall be a witness against us, for it has heard all the words of the Lord that he spoke to us. Therefore it shall be a witness against you, lest you deal falsely with your God.” 28 So Joshua sent the people away, every man to his inheritance.
29 After these things Joshua the son of Nun, the servant of the Lord, died, being 110 years old. 30 And they buried him in his own inheritance at Timnath-serah, which is in the hill country of Ephraim, north of the mountain of Gaash.
31 Israel served the Lord all the days of Joshua, and all the days of the elders who outlived Joshua and had known all the work that the Lord did for Israel.
32 As for the bones of Joseph, which the people of Israel brought up from Egypt, they buried them at Shechem, in the piece of land that Jacob bought from the sons of Hamor the father of Shechem for a hundred pieces of money. It became an inheritance of the descendants of Joseph.
33 And Eleazar the son of Aaron died, and they buried him at Gibeah, the town of Phinehas his son, which had been given him in the hill country of Ephraim. (ESV)