1 Then Joshua gathered all the tribes of Israel to Shechem and called for the elders of Israel, for their heads, for their judges, and for their officers; and they presented themselves before God.
2 And Joshua said to all the people, "Thus says the LORD God of Israel: 'Your fathers, including Terah, the father of Abraham and the father of Nahor, dwelt on the other side of the River in old times; and they served other gods.
3 'Then I took your father Abraham from the other side of the River, led him throughout all the land of Canaan, and multiplied his descendants and gave him Isaac.
4 'To Isaac I gave Jacob and Esau. To Esau I gave the mountains of Seir to possess, but Jacob and his children went down to Egypt.
5 'Also I sent Moses and Aaron, and I plagued Egypt, according to what I did among them. 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 'So they cried out to the LORD; and He put darkness between you and the Egyptians, brought the sea upon them, and covered them. And your eyes saw what I did in Egypt. Then you dwelt in the wilderness a long time.
8 'And I brought you into the land of the Amorites, who dwelt on the other side of the Jordan, and they fought with you. But I gave them into your hand, that you might possess their land, and I destroyed them from before you.
9 'Then Balak the son of Zippor, king of Moab, arose to make war against Israel, and sent and called Balaam the son of Beor to curse you.
10 'But I would not listen to Balaam; therefore he continued to bless you. So I delivered you out of his hand.
11 'Then you went over the Jordan and came to Jericho. And the men of Jericho fought against you, also the Amorites, the Perizzites, the Canaanites, the Hittites, the Girgashites, the Hivites, and the Jebusites. But I delivered them into your hand.
12 'I sent the hornet before you which drove them out from before you, also the two kings of the Amorites, but not with your sword or with your bow.
13 'I have given you a land for which you did not labor, and cities which you did not build, and you dwell in them; you eat of the vineyards and olive groves which you did not plant.'
14 "Now therefore, fear the LORD, serve Him in sincerity and in truth, and put away the gods which your fathers served on the other side of the River and in Egypt. Serve the LORD!
15 "And if it seems evil to you to serve the LORD, choose for yourselves this day whom you will serve, whether the gods which your fathers served that were on the other side of 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 So the people answered and said: "Far be it from us that we should forsake the LORD to serve other gods;
17 "for the LORD our God is He who brought us and our fathers up out of the land of Egypt, from the house of bondage, who did those great signs in our sight, and preserved us in all the way that we went and among all the people through whom we passed.
18 "And the LORD drove out from before us all the people, including the Amorites who dwelt in the land. We also will serve the LORD, for He is our God."
19 But Joshua said to the people, "You cannot serve the LORD, for He is a holy God. He is a jealous God; He will not forgive your transgressions nor your sins.
20 "If you forsake the LORD and serve foreign gods, then He will turn and do you harm and consume you, after He has done you good."
21 And the people said to Joshua, "No, but we will serve the LORD!"
22 So Joshua said to the people, "You are witnesses against yourselves that you have chosen the LORD for yourselves, to serve Him." And they said, "We are witnesses!"
23 "Now therefore," he said, "put away the foreign gods which are among you, and incline your heart to the LORD 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 made for them a statute and an ordinance in Shechem.
26 Then 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 oak that was by the sanctuary of the LORD.
27 And Joshua said to all the people, "Behold, this stone shall be a witness to us, for it has heard all the words of the LORD which He spoke to us. It shall therefore be a witness to you, lest you deny your God."
28 So Joshua let the people depart, each to his own inheritance.
Joshua presents Israel with choices, either to serve God, or to serve the gods of the lands around them. The people chose God, and Joshua tells them to count the cost of choosing to serve the Lord, for the Lord is a jealous God and will not let sin go unpunished.
Jesus Christ Himself warned us of counting the cost of discipleship when He said;
Luke 14:28-32
28 "For which of you, intending to build a tower, does not sit down first and count the cost, whether he has enough to finish it
29 "lest, after he has laid the foundation, and is not able to finish, all who see it begin to mock him,
30 "saying, 'This man began to build and was not able to finish.'
31 "Or what king, going to make war against another king, does not sit down first and consider whether he is able with ten thousand to meet him who comes against him with twenty thousand?
32 "Or else, while the other is still a great way off, he sends a delegation and asks conditions
of peace.
When the people agree to serve the Lord, Joshua commands that they rid themselves of any idols still
left in their possession and to diligently follow the Law of Moses, that it might be well with them.
Joshua 24:29-33
29 Now it came to pass after these things that Joshua the son of Nun, the servant of the LORD, died, being one hundred and ten years old.
30 And they buried him within the border of his inheritance at Timnath Serah, which is in the mountains of Ephraim, on the north side of Mount Gaash.
31 Israel served the LORD all the days of Joshua, and all the days of the elders who outlived Joshua, who had known all the works of the LORD which He had done for Israel.
32 The bones of Joseph, which the children of Israel had brought up out of Egypt, they buried at Shechem, in the plot of ground which Jacob had bought from the sons of Hamor the father of Shechem for one hundred pieces of silver, and which had become an inheritance of the children of Joseph.
33 And Eleazar the son of Aaron died. They buried him in a hill belonging to Phinehas his son,
which was given to him in the mountains of Ephraim.
Remember that God had commanded that Man would not live to be over 120 years old, therefore
Joshua died in a ripe old age.
In obedience to Joseph's last words, they buried his bones with his father in the inheritance of Joseph's
descendants.
And Phinehas, the High Priest of the Lord, was buried in the inheritance allotted to his son.