"And the donkey said to Balaam." The princes of Moab said to Balaam, when they saw how the donkey crouched beneath him: Why do you ride a donkey and not ride a horse? He said to them: My horse has a swollen, ailing leg, and so for the moment I took her. She said to him, "Am I not your donkey" — that is to say, you are not riding upon a horse but upon me. Balaam said to her: You are my donkey merely for bearing burdens, and not for riding. She said to him: No, but rather "upon which you have ridden"; and not only that, but I perform with you the act of riding by day, and the act of a woman by night — for he used to come upon his donkey. And "was I ever wont" refers only to the act of a woman, as you say, "and she became a companion to the king" (1 Kings 1:4). "And he said, No" — that he was not able to stand up against her rebuke.
Balaam's Donkey Rebukes Him and He Cannot Answer
Midrash Aggadah, Numbers 22:30
ותאמר האתון אל בלעם. אמרו לו השרים של מואב לבלעם, כשראו כשרבצה האתון תחתיו, למה אתה רוכב אתון, ואי אתה רוכב סוס, אמר להו ברטיבא שריגא ליה, ולפי שעה לקחתיה, אמרה לו הלא אנכי אתונך, כלומר כי אינך רוכב על סוס אלא עלי, אמר לה בלעם לטעינה בעלמא את אתוני ולא לרכיבה. אמרה לו לאו אלא אשר רכבת עלי, ולא עוד אלא שאני עושה עמך מעשה רכיבה ביום, ומעשה אשה בלילה, לפי שהיה בא על אתונו, ואין הסכן הסכנתי אלא מעשה אשה, כמה דתימר ותהי למלך סוכנת (מ"א א ד), ויאמר לא שלא היה יכול לעמוד על תוכחתה: