This took place after he had defeated King Sihon of the Amorites, who ruled in Heshbon, and at Edrei had defeated King Og of Bashan, who ruled in Ashtaroth.
So Moses wrote this entire body of instruction in a book and gave it to the priests, who carried the Ark of the Lord’s Covenant, and to the elders of Israel.
he added: “Take to heart all the words of warning I have given you today. Pass them on as a command to your children so they will obey every word of these instructions.
and as they camped in the valley near Beth-peor east of the Jordan River. (This land was formerly occupied by the Amorites under King Sihon, who ruled from Heshbon. But Moses and the Israelites destroyed him and his people when they came up from Egypt.