Deuteronomy 23:3-5

a No 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, b because they did not meet you with bread and with water on the way, when you came out of Egypt, and because they c hired against you Balaam the son of Beor from Pethor of d Mesopotamia, to curse you. But the  Lord your God would not listen to Balaam; instead the  Lord your God turned e the curse into a blessing for you, because the  Lord your God loved you.
Copyright information for ESV