The Messenger of Allah ﷺ held a horse race for the horses that had been trained for it, starting them from al-Hafya, and their finish line was Thaniyyat al-Wada. He also raced the horses that had not been trained, and their course ran from the Thaniyya to the mosque of Banu Zurayq.
أخبرنا إسمعيل بن مسعود قال حدثنا خالد عن ابن أبي ذئب عن نافع
أن رسول الله ﷺ سابق بين الخيل يرسلها من الحفياء وكان أمدها ثنية الوداع وسابق بين الخيل التي لم تضمر وكان أمدها من الثنية إلى مسجد بني زريق
Narrated by Muslim in the chapter on leadership, the section on horse racing and preparing horses for racing, hadith no. 1870, from Qutayba, and by Bukhari, in the book of jihad, the chapter on horses used for racing, hadith no. 2869, from the hadith of Layth bin Saad, with this wording. It is also found in Al-Kubra, hadith no. 4425.