When the Prophet ﷺ arrived in Medina, he found the Jews fasting on the day of Ashura. They were asked about this, and they said, "This is the day on which Allah granted Musa victory over Pharaoh, so we fast it to honor him."The Messenger of Allah ﷺ said, "We have a greater claim to Musa than you do," and he ordered that it be fasted.
حدثنا زياد بن أيوب حدثنا هشيم حدثنا أبو بشر عن سعيد بن جبير
لما قدم النبي ﷺ المدينة وجد اليهود يصومون عاشوراء فسئلوا عن ذلك فقالوا هذا اليوم الذي أظهر الله فيه موسى على فرعون ونحن نصومه تعظيما له فقال رسول الله ﷺ نحن أولى بموسى منكم وأمر بصيامه
Bukhari narrated it in the Merits of the Ansar, in the chapter on the Jews coming to the Prophet ﷺ when he arrived in Madinah, hadith 3943, from Ziyad bin Ayub, and Muslim narrated it in the Book of Fasting, in the chapter on fasting the day of Ashura, hadith 1130, from the hadith of Hushaym, with this same chain.