12 And the Horites in earlier times were living in Seir, but the children of Esau took their place; they sent destruction on them and took their land for themselves, as Israel did to the land of his heritage which the Lord gave them.) 13 Get up now, and go over the stream Zered. So we went over the stream Zered. 14 Thirty-eight years had gone by from the time when we came away from Kadesh-barnea till we went over the stream Zered; by that time all the generation of the men of war among us were dead, as the Lord had said. 15 For the hand of the Lord was against them, working their destruction, till all were dead. 16 So when death had overtaken all the men of war among the people, 17 The word of the Lord came to me, saying, 18 You are about to go by Ar, the limit of the country of Moab; 19 And when you come near the land of the children of Ammon, give them no cause of trouble and do not make war on them, for I will not give you any of the land of the children of Ammon for your heritage: because I have given it to the children of Lot. 20 (That land is said to have been a land of the Rephaim, for Rephaim had been living there in earlier times, but they were named Zamzummim by the Ammonites; 21 They were a great people, tall as the Anakim, and equal to them in number; but the Lord sent destruction on them and the children of Ammon took their place, living in their land; 22 As he did for the children of Esau living in Seir, when he sent destruction on the Horites before them, and they took their land where they are living to this day:
Matthew Henry's Commentary on Deuteronomy 2:12-22
Commentary on Deuteronomy 2:8-23
(Read Deuteronomy 2:8-23)
We have the origin of the Moabites, Edomites, and Ammonites. Moses also gives an instance older than any of these; the Caphtorims drove the Avims out of their country. These revolutions show what uncertain things wordly possessions are. It was so of old, and ever will be so. Families decline, and from them estates are transferred to families that increase; so little continuance is there in these things. This is recorded to encourage the children of Israel. If the providence of God has done this for Moabites and Ammonites, much more would his promise do it for Israel, his peculiar people. Cautions are given not to meddle with Moabites and Ammonites. Even wicked men must not be wronged. God gives and preserves outward blessings to wicked men; these are not the best things, he has better in store for his own children.