At the end of his life, Joshua exhorted the people to remain faithful to God in the midst of surrounding nations that served idols.