Mount Sinai.
The Book of Deuteronomy is the fifth book of the Bible and the last of the Pentateuch or Torah, the five books written by Moses. Deuteronomy contains three sermons given by Moses to the Israelites who are to enter the promised land. The word Deuteronomy means 'second law giving' as the book reiterates the laws God has given to His people for the generation of Israelites who were not present when the laws were first given.
Deuteronomy 23:3-4
"An Ammonite or Moabite shall not enter into the congregation of the Lord; even to their tenth generation shall they not enter into the congregation of the Lord for ever: because they met you not with bread and with water in the way, when ye came forth out of Egypt; and because they hired against thee Balaam the son of Beor of Pethor of Mesopotamia, to curse thee."
The ban on entering the congregation of the Lord does not mean that they were not allowed to convert to Judaism, but that intermarriage was not permitted. This only applied to males, as King David's ancestor, Ruth, was a Moabite