Joshua being old, convenes the states of Israel a little before his death, Jos 23:1; and in his address to them observes what God had done for them, and would do, Jos 23:3; and exhorts them to keep the commandments of God, and cleave to him, and not to mix with the Gentiles, and join with them in idolatrous practices, and then it would be well with them, Jos 23:6; but otherwise should they join with them, and depart from the Lord, who had so faithfully and punctually performed every good thing he had promised them, they might expect all evils and calamities, utter ruin and destruction, to befall them, Jos 23:12.

And it came to pass a long time after,.... Or "after many days" (o), that is, years:

that the Lord had given rest unto Israel from all their enemies round about; the greatest part of the land of Canaan was subdued, the whole divided by lot to the tribes of Israel, and they quietly settled in the respective portions assigned them, the Canaanites that remained giving them no disturbance, in which state of rest and peace they had now been for some years; and this may be reasonably supposed to be the last year of the life of Joshua, see Jos 23:14.

that Joshua waxed old and stricken in age; and became feeble and decrepit, and greatly declined; for though he was ten years younger than Moses when he died, yet not so vigorous, strong, and robust as he, but was pressed and bore down with the infirmities of age.

And Joshua called for all Israel,.... Summoned them together, whether at Timnathserah, his own city, he being old and infirm, and not able to go elsewhere; or whether at Shechem, where it is plain they were afterwards convened, Jos 24:1, or whether rather at Shiloh, where the tabernacle was, is not certain; and by "all Israel" cannot be meant the whole body of the people, unless it can be thought to be at one of the feasts, when all the males in Israel appeared before the Lord; though this seems to be not a stated convocation, but occasionally made, and to be understood of the representatives of the people called together, as explained in the following clause:

and for their elders, and for their heads, and for their judges, and for their officers; the first and is supplied, and another word or words may be supplied, as "even", or "that is", or the like, and so explanative of all Israel, namely, "their elders", both in age and office, especially the latter, the seventy elders, or who composed what in later times was called the great sanhedrim; and the "heads" of their tribes, the chief princes of every tribe; and their "judges" in their several cities, who heard and tried causes, and administered justice and judgment to the people; and their "officers", who attended on them to execute the judgment they pronounced:

and said unto them, I am old and stricken in age; which he observes as a reason of his calling them together to give them some advice and instructions before his death, and in order to command greater reverence of him, and respect to him, and to excite attention to what he had to say to them.

And ye have seen all that the Lord your God hath done unto all those nations because of you,.... How he had destroyed them, and driven them out of their habitations to make room for them, meaning the seven nations of the Canaanites:

for the Lord your God is he that hath fought for you; Joshua does not attribute any of the things that were done to his own valour, nor theirs, nor so much as mentions himself or them as instruments, but wholly ascribes all to the Lord, who fought their battles for them, and conquered their enemies, and subdued them under them; the Targum is,"the Word of the Lord fought for you;''the Captain of the host of the Lord, Jos 5:14.

Behold, I have divided to you by lot these nations that remain,.... Who are unsubdued, not yet conquered, as well as those that are

to be an inheritance for your tribes; to be possessed by them and their children for ever:

from Jordan, with all the nations I have cut off, even unto the great sea westward; the phrase, "with all the nations I have cut off", is to be read in connection with "those nations that remain"; both those that were cut off by the sword of Joshua, and those that remained unconquered, being divided by lot to the tribes of Israel; and which reached from Jordan eastward, where Joshua and Israel entered into the land, to the Mediterranean sea, called the great sea in comparison of little ones in Canaan, as the Dead sea, and the sea of Tiberias; and which great sea lay west to the land of Israel, or where the sun sets, as the phrase in the Hebrew text is.

And the Lord your God he shall expel them from before you,.... That is, such of them as yet remained among them:

and drive them from out of your sight; the same thing expressed by different words, for the confirmation of it:

and ye shall possess their land, as the Lord your God hath promised unto you; all which is to be understood on condition of their good behaviour towards the Lord, and obedience to his commands; by which tenure they held the possession of the land when put into it, and for their disobedience did not possess the whole.

Be ye therefore very courageous to keep and to do all that is written in the book of the law of Moses,.... To observe which required spiritual strength, fortitude of mind, a holy courage, a firm and fixed resolution, and particularly to destroy the Canaanites required in that book, and to abstain from all communion and fellowship with them:

that ye turn not aside therefrom, to the right hand or the left; See Gill on Jos 1:7.

That ye come not among these nations, those that remain among you,.... That remained unsubdued, or that were suffered to dwell among them, being tributaries to them; with these they were not to converse freely and familiarly, nor to carry on trade and commerce with them, nor enter into any alliances or marriages with them, and not even attend any of their feasts, and especially their idolatrous ones:

neither make mention of the name of their gods; not in common conversation, and still less in any religious matters; never with any reverence of them, or in any respectable manner; but always with indignation and contempt, calling them dunghill gods, and the like, as they often are in Scripture:

nor cause to swear by them; neither swear by them themselves, nor cause others to swear by them, as Abarbinel; or a man his neighbour, as Kimchi; no, not a Gentile, as Ben Melech; so it is said in the Misnah (p),"he that vows in the name of an idol, and confirms in his name, (which Bartenora interprets, swears by his name,) transgresses a negative precept.''Maimonides (q) also says,"he that vows in the name of an idol, and swears by it, is to be beaten--he that swears by it himself, or causes a Gentile to swear by it; for it is forbidden to cause a Gentile to swear by his fear (or idol), and even to cause him to make mention of it, though not in the way of an oath, it is forbidden:"

neither serve them; by offering any sacrifice or incense to them, or by praying to them, or offering them praises on any account, or by performing any religious service in any instance or form whatever:

But cleave unto the Lord your God,.... To his word, worship, and ordinances; externally, by close adherence to them, and strict observation of them; and internally, by strong affection to him, hope, trust, and confidence in him, expectation of all good things from him, and constant application to him for help in all times of need, and a fixed dependence on him:

as ye have done unto this day; that is, since they came into the land of Canaan, and had been under the government of Joshua; for otherwise, while in the wilderness, they frequently revolted from God, and murmured against him; and this is to be understood not of individuals, who doubtless were guilty of various failings and sins, but of the whole body, and with respect to any notorious offence, particularly idolatry, which they had not fallen into since they came into the land of Canaan, and had very lately shown great zeal against it; not only the tribes on this side, but those on the other side Jordan, as the preceding chapter largely relates.

For the Lord hath driven out before you great nations and strong,.... Especially as they were reckoned in those times, before any great monarchies had existed, as did afterwards; and indeed these were, considering the land they inhabited, very numerous and populous, and were very stout and able bodied men, and some of a gigantic stature; and all dwelt in strong fortified cities, and were able to bring out large armies into the field, with chariots of iron, so that they were very formidable; but notwithstanding all this, the Lord drove them out of their strong holds, and put Israel into the possession of them, and of their land:

but as for you, no man hath been able to stand before you unto this day; that is, of those that came out against them, and fought with them; these were all to a man cut off by them, or fled before them, and became tributaries to them; otherwise there were many, who as yet were not expelled by them; this the Lord had promised, and now had fulfilled, Deu 11:25.

One man of you shall chase a thousand,.... Here Kimchi and Ben Melech observe, that the future tense is put for the past, and that the sense is, one of them had chased a thousand in their war with the Canaanites; but Abarbinel disapproves of this observation, and thinks it refers to time to come, what they should be able to do if they cleaved unto the Lord; this was fulfilled in Samson, Jdg 15:15; such a promise was made, Lev 26:8,

for the Lord your God he it is that fighteth for you; and no wonder then that a thousand should be put to flight by one man; the Targum interprets it of the Word of the Lord, as in Jos 23:3,

Take good heed therefore unto yourselves,.... To be upon their guard, and to be watchful, were very necessary to them, that they might not be ensnared by the Canaanites, and drawn aside by them into idolatry, and so apostatize from the Lord and his worship, since their temptations would be many:

that ye love the Lord your God; which would the most strongly influence and engage them to serve and worship the Lord, and obey his commands, and be the best preservative against idolatry and false worship.

Else if ye do in any wise go back,.... From the Lord and his worship, from his word and ordinances:

and cleave unto the remnant of these nations, even those that remain among you; in cities not taken, or in several which the Philistines were in possession of, or lived among them as tributaries to them, if they should take to them, and be free and familiar with them, which may lead on to nearer connections in civil and religious matters:

and shall make marriages with them; marry their daughters to the sons of Canaanites, or admit the daughters of Canaanites to be married to their sons:

and go in unto them, and they to you; which is expressive of the consummation of marriage, and of the performance of the conjugal duty,

Know for a certainty that the Lord your God will no more drive out any of these nations from before you,.... Or, "knowing ye shall know" (r); or "know ye"; this may be taken for granted, or the fullest proof, and clearest demonstration, and strongest assurance will be given of it, that in case of such bad conduct, and disobedience to the will of God, no more of the nations of the Canaanites will be driven out of the cities in which they are:

but they shall be snares and traps unto you; who by their bad examples would draw them both to idolatry and superstitious worship, and into all irreligion, profaneness, and immorality, as they did, Psa 106:35,

and scourges in your sides; who either, by ensnaring them, would get an advantage over them, and distress them in their persons, families, and estates; or would be the means of the Lord's correcting and chastising them with the rod and stripes of men, for the iniquities these would draw them into; the allusion is to scourges and lashes laid on the sides of men, or to goads with which beasts are pushed on their sides and driven:

and thorns in your eyes; very troublesome and distressing; for even a mote in the eye is very afflicting: and much more a thorn; See Gill on Num 33:55. Jarchi interprets this word by camps surrounding them, as shields do the bodies of men, and which is approved of by Gussetius (s):

until ye perish from off this good land, which the Lord your God hath given you; by sword, famine, pestilence, or captivity, which has been their case.

And, behold, this day I am going the way of all the earth,.... That is, about to die; not that precise day, but in a short time, of which the daily increasing infirmities of old age gave him notice. Death is a journey from this world to another, a man's going to his long home, a path trodden by all men, and but once (t); a way in which all men without exception must and do walk, and even the best as well as the greatest of men, such as Joshua; no man is exempted from death, be he ever so great or good, ever so wise and knowing, ever so holy or so useful; see Kg1 2:2,

and ye know in all your hearts, and in all your souls; in their consciences; it was a glaring truth, which none could deny; it had a testimony in every man's breast:

that not one thing hath failed of all the good things which the Lord your God hath spoken concerning you; particularly concerning the good land, and the Lord's bringing them into it, removing the old inhabitants, and settling them in their room, and putting them in possession of all temporal good things and spiritual privileges, as the word and ordinances:

all are come to pass unto you, and not one thing hath failed thereof; see Jos 21:45.

Therefore it shall come to pass, that as all the good things are come upon you which the Lord hath promised you,.... Of which there was full proof, and it could not be denied:

so shall the Lord bring upon you all evil things; calamities and distresses, by his sore judgments of famine, sword, pestilence, evil beasts, and captivity, in case of disobedience to his commands:

until he have destroyed you from off this good land which the Lord your God hath given you; for as he is faithful to his promises, so to his threatenings; and from his punctual performance of the one may be argued and expected the sure fulfilment of the other, and which has been abundantly verified in that people; see Lev 26:1 and the notes there.

which he commanded you,.... The law, so called, and the several precepts of it, particularly those which relate to the faith and worship of the one only true God; see Exo 24:7;

and have gone and served other gods, and have bowed down yourselves unto them; been guilty of idolatry, of having and worshipping other gods, which are no gods, with or besides the God of Israel, see Jos 23:7,

then shall the anger of the Lord be kindled against you; nothing being more provoking to him than idolatry, he being a jealous God of his honour and worship:

and ye shall perish quickly from off the good land which he hath given unto you; as they did at the time of the Babylonish captivity, and at the last destruction of Jerusalem by the Romans.