Micah 6:5

עַמִּי זְכָר נָא מַה יָּעַץ בָּלָק מֶלֶךְ מוֹאָב וּמֶה עָנָה אֹתוֹ בִּלְעָם בֶּן בְּעוֹר מִן הַשִּׁטִּים עַד הַגִּלְגָּל לְמַעַן דַּעַת צִדְקוֹת ה’

My people, remember now what Balak king of Moab devised and what Balaam, son of Beor, answered him; from Shittim to Gilgal, that you may know the righteous acts of Hashem.

The prophet Micah does not specify: what exactly did Balaam answer Balak? Rashi says that it refers to Numbers 23:8, “How can I be angry if G-d is not angry?” Ibn Ezra says it refers to Numbers 22:18, where Balaam said that he could only say what G-d instructed him to say, which is what led him to bless Israel rather than curse them.