Nevertheless, the LORD thy God would not hearken to Balaam: but the LORD thy God turned the curse into a blessing to thee, because the LORD thy God loved thee.
Deuteronomy 23
Deuteronomy 23:4-6