I set out with the Messenger of Allah ﷺ during the time of Hudaybiyah. His companions entered the state of ihram, but I did not. I saw a wild donkey, charged at it on my mount, and hunted it down. I then mentioned the matter to the Messenger of Allah ﷺ, explaining that I had not entered ihram and that I had hunted it for him. The Prophet ﷺ instructed his companions to eat from it, but he himself did not eat any of it once I told him that I had hunted it for his sake.
حدثنا محمد بن يحيى حدثنا عبد الرزاق أنبأنا معمر عن يحيى بن أبي كثير
خرجت مع رسول الله ﷺ زمن الحديبية فأحرم أصحابه ولم أحرم فرأيت حمارا فحملت عليه واصطدته فذكرت شأنه لرسول الله ﷺ وذكرت أني لم أكن أحرمت وأني إنما اصطدته لك فأمر النبي ﷺ أصحابه أن يأكلوه ولم يأكل منه حين أخبرته أني اصطدته له
Bukhari narrated it in Kitab Jaza al-Sayd, chapter "If a Non-Muharram Hunter Hunts and Gives the Game as a Gift to a Muharram, He May Eat It," no. 1821 and no. 1822 and others, and Muslim narrated it in Kitab al-Hajj, chapter "The Prohibition of Hunting Edible Land Game," no. 59/1196, from the hadith of Yahya, through the same chain.