قَوْلُهُ تَعَالَى: {كُتِبَ عَلَيْكُمُ الصِّيَامُ كَمَا كُتِبَ عَلَى الَّذِينَ مِنْ قَبْلِكُمْ} [البقرة: 183]
(The tribe of) Quraish used to fast on the day of Ashura' in the Pre-Islamic period, and then Allah's Apostle ordered (Muslims) to fast on it till the fasting in the month of Ramadan was prescribed; whereupon the Prophet ﷺ said, "He who wants to fast (on 'Ashura') may fast, and he who does not want to fast may not fast." (Using translation from Bukhārī 1893)
أَنَّ قُرَيْشًا كَانَتْ تَصُومُ يَوْمَ عَاشُورَاءَ فِي الْجَاهِلِيَّةِ ثُمَّ أَمَرَ رَسُولُ اللهِ ﷺ بِصِيَامِهِ حَتَّى فُرِضَ رَمَضَانُ فَقَالَ رَسُولُ اللهِ ﷺ «مَنْ شَاءَ فَلْيَصُمْهُ وَمَنْ شَاءَ أَفْطَرَهُ»