Deuteronomy 23:3-4

Deuteronomy 23:3-4 ASV

An Ammonite or a Moabite shall not enter into the assembly of Jehovah; even to the tenth generation shall none belonging to them enter into the assembly of Jehovah 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 from Pethor of Mesopotamia, to curse thee.

Read Deuteronomy 23