The people of Mecca asked the Messenger of Allah ﷺ to show them a sign, so he showed them the splitting of the moon.
أن أهل مكة سألوا رسول الله ﷺ أن يريهم آية. فأراهم انشقاق القمر.
Bukhari related it in the Book of Virtues (3637) and Muslim in the Book of the Characteristics of the Hypocrites (2802), both from the hadith of Yunus, who said, Shayban told us, from Qatada, from Anas, and he narrated it.It is also established through the hadith of Ibn Abbas and Ibn Masud, see: The Miracles.In Sahih Bukhari (2866), from the hadith of Saeed bin Abu Aruba, from Qatada, from Anas, the people of Makkah asked the Messenger of Allah ﷺ to show them a sign. So he showed them the moon split into two halves, until they saw Hira between them.