It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him). Abu Labid relates: During the governorship of al-Hakam bin Ayyub we went to watch a horse race, and on the way back we came to Sayyiduna Anas bin Malik (may Allah be pleased with him) at his residence, al-Zawiyah, and asked: "O Abu Hamzah! Did you people use to bet (compete) on horse races in the blessed time of the Messenger of Allah (peace and blessings be upon him), and did the Messenger of Allah (peace and blessings be upon him) himself ever take part in such a contest?" He replied: "Yes! By Allah, he (peace and blessings be upon him) placed a wager on a horse of his named Sabhah, and it came first, at which he (peace and blessings be upon him) was very pleased." Imam Ahmad bin Mani' and Imam al-Bayhaqi in his Sunan also recorded this hadith; al-Bayhaqi's wording is: "He (peace and blessings be upon him) was pleased at this win and it delighted him greatly." Yazid bin Harun and Affan bin Muslim also narrated it from Sa'id bin Zayd with the same meaning.
Hadith Takhrij«سعيد بن زيد أخو حماد: صدوق له أوهام؛ الزبير بن الخريت: ثقة؛ أبو لبيد لمازة بن زبار: صدوق (التقريب، من الحفظ)» «(4809/1) أخرجه مصنف ابن أبي شيبة برقم: 12، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 9356» «(4809/2) أخرجه مسند أحمد برقم: 12216، 13277، وأخرجه سنن الدارمي برقم: 2430، وأخرجه المعجم الأوسط للطبراني برقم: 8845، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 9356، وأخرجه الأحاديث المختارة برقم: 2580، وأخرجه الأوسط في السنن والإجماع والاختلاف برقم: 6412»