Arcana Coelestia # 10647
10647. 'Lest by chance you make a covenant with the inhabitants of the land' means being linked thereby to any other sort of religion that has evil in it. This is clear from the meaning of 'a covenant' as a joining or linking together, dealt with in 665, 666, 1023, 1038, 1864, 1996, 2003, 2021, 6804, 8767, 8778, so that 'making a covenant' means being linked to; and from the meaning of 'the inhabitants of the land' as a religion involving evil, dealt with above in 10640. Whether you say a religion involving evil or the evil of a religion, it amounts to the same thing. The injunction that no covenant was to be made with the inhabitants of the land is repeated here on account of the train of thought in the internal sense.
Deuteronomy 31:24-26
24
It happened, when Moses had made an end of writing the words of this law in a book, until they were finished,
25
that Moses commanded the Levites, who bore the ark of the covenant of Yahweh, saying,
26
"Take this book of the law, and put it by the side of the ark of the covenant of Yahweh your God, that it may be there for a witness against you.