Deuteronomy 23:3-5

DouayRheims(i) 3 The Ammonite and the Moabite, even after the tenth generation shall not enter into the church of the Lord for ever: 4 Because they would not meet you with bread and water in the way, when you came out of Egypt: and because they hired against thee Balaam, the son of Beor, from Mesopotamia in Syria, to curse thee. 5 And the Lord thy God would not hear Balaam, and he turned his cursing into thy blessing, because he loved thee.