Deuteronomy 23:3-5

VIN(i) 3 No Ammonite or Moabite or any of their people to the tenth generation may come into the meeting of the Lord's people: 4 Because they gave you no bread or water on your way, when you came out of Egypt: and they got Balaam, the son of Peor, from Pethor in Aram-naharaim to put curses on you. 5 But the LORD your God would not listen to Balaam, but the LORD your God turned the curse to a blessing to you, because the LORD your God loved you.