[Machine] The Prophet ﷺ left Medina in Ramadan with ten thousand Muslims. This happened after he had been in Medina for eight and a half years. He traveled to Mecca with those Muslims, and they fasted until they reached Al-Kadeed, which is between Usfan and Qudayd. Then, the Prophet and the Muslims with him broke their fast. They did not fast for the rest of Ramadan. Al-Zuhri said, "Breaking the fast was the last thing to be commanded. It was only done based on the orders of the Messenger of Allah ﷺ . Therefore, the last thing is taken as the final ruling." Al-Zuhri also said, "The Messenger of Allah ﷺ reached Mecca at the beginning of the thirteenth night of Ramadan."
أَنَّ النَّبِيَّ ﷺ خَرَجَ فِي رَمَضَانَ مِنَ الْمَدِينَةِ وَمَعَهُ عَشَرَةُ آلَافٍ مِنَ الْمُسْلِمِينَ وَذَلِكَ عَلَى رَأْسِ ثَمَانِ سِنِينَ وَنِصْفٍ مِنْ مَقْدَمِهِ الْمَدِينَةَ فَسَارَ بِمَنْ مَعَهُ مِنَ الْمُسْلِمِينَ إِلَى مَكَّةَ يَصُومُ وَيَصُومُونَ حَتَّى بَلَغَ الْكَدِيدَ وَهُوَ بَيْنَ عُسْفَانَ وَقُدَيْدٍ فَأَفْطَرَ وَأَفْطَرَ الْمُسْلِمُونَ مَعَهُ فَلَمْ يَصُومُوا بَقِيَّةَ رَمَضَانَ شَيْئًا قَالَ الزُّهْرِيُّ فَكَانَ الْفِطْرُ آخِرَ الْأَمْرَيْنِ وَإِنَّمَا يُؤْخَذُ مِنْ أَمْرِ رَسُولِ اللهِ ﷺ الْآخِرُ فَالْآخِرُ قَالَ الزُّهْرِيُّ فَصَبَّحَ رَسُولُ اللهِ ﷺ مَكَّةَ لِثَلَاثَ عَشْرَةَ لَيْلَةً خَلَتْ مِنْ رَمَضَانَ