Muʿādh ibn Jabal—may Allah be pleased with him—said: “The prescribed prayer underwent three transformations. When the Prophet, peace and blessings be upon him, arrived in Madinah he prayed for seventeen months facing Jerusalem. Then Allah revealed, ‘We have certainly seen the turning of your face toward the heaven…’ (al-Baqarah 2:144), and so He directed him toward Mecca. That was the first change.
“They used to gather for the prayer and simply notify one another of its time, until they struck—or were on the verge of striking—a bell. Then a man from the Anṣār named ʿAbd Allah ibn Zayd came to the Messenger of Allah, peace and blessings be upon him, and said, ‘Messenger of Allah, I have seen in a dream—indeed, had I claimed to be awake you would have believed me. I was between sleep and wakefulness when I saw a figure wearing two green garments. He faced the qiblah and proclaimed:
Allāhu akbar, Allāhu akbar.
Ashhadu an lā ilāha illā Allah, ashhadu an lā ilāha illā Allah,
repeating each phrase twice until he finished the adhān. He paused briefly and then said the same words, adding:
Qad qāmati’s-ṣalāh, qad qāmati’s-ṣalāh (The prayer has commenced, the prayer has commenced).’
“The Messenger of Allah, peace and blessings be upon him, said, ‘Teach it to Bilāl, and let him make the call.’ Bilāl was therefore the first to pronounce the adhān.
“ʿUmar ibn al-Khaṭṭāb then came and said, ‘Messenger of Allah, the same words came to me, but he has preceded me.’ These are two of the three changes.” The ḥadith continues.
Recorded by Aḥmad (5/246) and Abū Dāwūd (82) from al-Masʿūdī, who narrated it from ʿAmr ibn Murrah, from ʿAbd al-Raḥmān ibn Abī Laylā, from Muʿādh. Al-Ḥākim (2/224) also transmitted a portion of it concerning fasting through this chain and said: