← Sahih al-Bukhari
Sahih al-Bukhari · Hadith #3482 · Virtues and Merits of the Prophet (pbuh) and his Companions

Narrated Anas:

حَدَّثَنِي عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ، حَدَّثَنَا يُونُسُ، حَدَّثَنَا شَيْبَانُ، عَنْ قَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ،‏.‏ وَقَالَ لِي خَلِيفَةُ حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، حَدَّثَنَا سَعِيدٌ، عَنْ قَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ ـ رضى الله عنه ـ أَنَّهُ حَدَّثَهُمْ أَنَّ أَهْلَ مَكَّةَ سَأَلُوا رَسُولَ اللَّهِ صلى الله عليه وسلم أَنْ يُرِيَهُمْ آيَةً، فَأَرَاهُمُ انْشِقَاقَ الْقَمَرِ‏.‏

That the Meccan people requested Allah's Messenger (ﷺ) to show them a miracle, and so he showed them the
splitting of the moon.