Now therefore fear the LORD, and serve Him in sincerity and in truth: and put away the gods which your fathers served on the other side of the flood, and in Egypt; and serve ye the LORD. And if it seem evil unto you to serve the LORD, choose you this day whom ye will serve; whether the gods which your fathers served that were on the other side of the flood, or the gods of the Amorites, in whose land ye dwell: but as for me and my house, we will serve the LORD.
And the people answered and said, “God forbid that we should forsake the LORD, to serve other gods; for the LORD our God, He it is that brought us up and our fathers out of the land of Egypt, from the house of bondage, and which did those great signs in our sight, and preserved us in all the way wherein we went, and among all the people through whom we passed: and the LORD drave out from before us all the people, even the Amorites which dwelt in the land: therefore will we also serve the LORD; for He is our God.” And Joshua said unto the people, “Ye cannot serve the LORD: for He is an holy God; He is a jealous God; He will not forgive your transgressions nor your sins. If ye forsake the LORD, and serve strange gods, then He will turn and do you hurt, and consume you, after that He hath done you good.”
And the people said unto Joshua, “Nay; but we will serve the LORD.” And Joshua said unto the people, “Ye are witnesses against yourselves that ye have chosen you the LORD, to serve him.” And they said, “We are witnesses.”
“Now therefore put away the strange gods which are among you, and incline your heart unto the LORD God of Israel.” And the people said unto Joshua, “The LORD our God will we serve, and His voice will we obey.”
So Joshua made a covenant with the people that day, and set them a statute and an ordinance in Shechem. And Joshua wrote these words in the book of the law of God, and took a great stone, and set it up there under an oak, that was by the sanctuary of the LORD. And Joshua said unto all the people, “Behold, this stone shall be a witness unto us; for it hath heard all the words of the LORD which He spake unto us: it shall be therefore a witness unto you, lest ye deny your God.
So Joshua let the people depart, every man unto his inheritance. Joshua 24:14-28
References: Joshua 24:1-13, 29-33; Job 28:28; Psalm 111:10; 119:111-112; 130:4; Hosea 3:5; Acts 9:31; 1 Corinthians 10:20-22; 2 Timothy 2:12-13; Titus 1:16; Hebrews 12:28-29; Revelation 3:8