Deuteronomy 23:5 NIV

5 However, the LORD your God would not listen to Balaam but turned the curse1 into a blessing for you, because the LORD your God loves2 you.

References for Deuteronomy 23:5