It is narrated from Hazrat Anas (may Allah be pleased with him) that the people of Makkah requested the Prophet (peace and blessings be upon him) to show them a miracle, so the Prophet (peace and blessings be upon him) showed them the miracle of the splitting of the moon twice, and upon this the verse was revealed: "The Hour has drawn near, and the moon has split."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 12688