After handing over the office to Joshua, and the law to the priests and elders, Moses was called by the Lord to come to the tabernacle with Joshua, to command him (צִוָּה), i.e., to appoint him, confirm him in his office. To this end the Lord appeared in the tabernacle (Deu 31:15), in a pillar of cloud, which remained standing before it, as in Num 12:5 (see the exposition of Num 11:25). But before appointing Joshua, He announced to Moses that after his death the nation would go a whoring after other gods, and would break the covenant, for which it would be visited with severe afflictions, and directed him to write an ode and teach it to the children of Israel, that when the apostasy should take place, and punishment from God be felt in consequence, it might speak as a witness against the people, as it would not vanish from their memory. The Lord communicated this commission to Moses in the presence of Joshua, that he also might hear from the mouth of God that the Lord foreknew the future apostasy of the people, and yet nevertheless would bring them into the promised land. In this there was also implied an admonition to Joshua, not only to take care that the Israelites learned the ode and kept it in their memories, but also to strive with all his might to prevent the apostasy, so long as he was leader of Israel; which Joshua did most faithfully to the very end of his life (vid., Josh 23 and 24). - The announcement of the falling away of the Israelites from the Lord into idolatry, and the burning of the wrath of God in consequence (Deu 31:16-18), serves as a basis for the command in Deu 31:19. In this announcement the different points are simply linked together with “and,” whereas in their actual signification they are subordinate to one another: When thou shalt lie with thy fathers, and the people shall rise up, and go a whoring after other gods: My anger will burn against them, etc. קוּם, to rise up, to prepare, serves to bring out distinctly the course which the thing would take. The expression, “foreign gods of the land,” indicates that in the land which Jehovah gave His people, He (Jehovah) alone was God and Lord, and that He alone was to be worshipped there. בְּקִרְבֹּו is in apposition to שָׁמָּה, “whither thou comest, in the midst of it.” The punishment announced in Deu 31:17 corresponds most closely to the sin of the nation. For going a whoring after strange gods, the anger of the Lord would burn against them; for forsaking Him, He would forsake them; and for breaking His covenant, He would hide His face from them, i.e., withdraw His favour from them, so that they would be destroyed. לֶאֱכֹל הָיָה, it (the nation) will be for devouring, i.e., will be devoured or destroyed (see Ewald, §237, c.; and on אָכַל in this sense, see Deu 7:16, and Num 14:9). “And many evils and troubles will befall it; and it will say in that day, Do not these evils befall me, because my God is not in the midst of me?” When the evils and troubles broke in upon the nation, the people would inquire the cause, and would find it in the fact that they were forsaken by their God; but the Lord (“but I” in Deu 31:18 forms the antithesis to “they” in Deu 31:17) would still hide His face, namely, because simply missing God is not true repentance.