Sayyiduna Ibn Abbas (may Allah be pleased with them both) said that the Prophet (peace and blessings be upon him) set out from Madinah in Ramadan with ten thousand Muslims, and that was at the completion of eight and a half years after his arrival in Madinah. He (peace and blessings be upon him) and the Muslims with him travelled while fasting, and when they reached the place called al-Kadid, which is between Usfan and Qudayd, he (peace and blessings be upon him) broke his fast and the Muslims broke their fast too. Then they did not fast for the rest of Ramadan.
Imam al-Zuhri (may Allah have mercy on him) said: Breaking the fast was the last of the two commands, and it was the Messenger of Allah (peace and blessings be upon him) who commanded it, and it is the last that is acted upon. Imam al-Zuhri (may Allah have mercy on him) said: Then the Messenger of Allah (peace and blessings be upon him) reached Makkah in the morning, when thirteen nights of Ramadan had passed.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8142