كتاب الحج
20  
Hajj

Yahya related to me from Malik from Jafar ibn Muhammed ibn AIi from his father from Jabir ibn Abdullah that the Messenger of Allah, may Allah bless him and grant him peace, used to say, "Allah is greater" three times when he stopped on Safa, and "There is no god but Allah, alone, without any partner. To Him belong the Kingdom and praise, and He has power over everything" three times, and make dua. He would then do the same on Marwa.

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ جَعْفَرِ بْنِ مُحَمَّدِ بْنِ عَلِيٍّ، عَنْ أَبِيهِ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ إِذَا وَقَفَ عَلَى الصَّفَا يُكَبِّرُ ثَلاَثًا وَيَقُولُ ‏ "‏ لاَ إِلَهَ إِلاَّ اللَّهُ وَحْدَهُ لاَ شَرِيكَ لَهُ لَهُ الْمُلْكُ وَلَهُ الْحَمْدُ وَهُوَ عَلَى كُلِّ شَىْءٍ قَدِيرٌ ‏"‏ ‏.‏ يَصْنَعُ ذَلِكَ ثَلاَثَ مَرَّاتٍ وَيَدْعُو وَيَصْنَعُ عَلَى الْمَرْوَةِ مِثْلَ ذَلِكَ ‏.‏
USC-MSA web (English) reference : Book 20, Hadith 128
Arabic reference : Book 20, Hadith 831