It would have been fitting that the rebukes (in the Book of Deuteronomy) be pronounced by Balaam, and that the blessings (in the Parshah of Balak) be said by Moses... But G-d said: Let Moses, who loves them, rebuke them; and let Balaam, who hates them, bless them
Midrash Yalkut Shimoni