Deuteronomy 23:3-5

3 aNo Ammonite or Moabite may enter the assembly of the Lord. Even to the tenth generation, none of them may enter the assembly of the Lord forever, 4 bbecause they did not meet you with bread and with water on the way, when you came out of Egypt, and because they chired against you Balaam the son of Beor from Pethor of dMesopotamia, to curse you. 5But the Lord your God would not listen to Balaam; instead the Lord your God turned ethe curse into a blessing for you, because the Lord your God loved you.
Copyright information for ESV