It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (ﷺ) attacked the people of Khaybar early in the morning. At that time, they had just come out of their fortresses with their women. When they saw the Messenger of Allah (ﷺ), they cried out: "Muhammad (ﷺ) has come with an army, Muhammad (ﷺ) has come with an army!" Then they ran towards the fortress. The Prophet (ﷺ) raised his hands and said three takbirs: "Allahu Akbar! Khaybar is destroyed. Whenever we descend upon the land of a people (for jihad), then the morning of those who have been warned becomes evil." When the Messenger of Allah (ﷺ) conquered Khaybar, some donkeys became available to the noble Companions (may Allah be pleased with them), whose meat they cooked. In the meantime, a caller from the Messenger of Allah (ﷺ) announced: "Beware! Indeed Allah and His Messenger (ﷺ) forbid you from this meat. Indeed, donkeys are impure." Upon hearing the announcement, they overturned the pots.
Hadith Referenceالسنن المأثورة / باب في أكل لحوم الخيل والبغال والحمير / 569
Hadith Takhrijصحیح بخاری، الجهاد، باب التكبير عند الحرب، رقم: 3647۔