كتاب الحج
15  
The Book of Pilgrimage
(94)
Chapter: The virtue of praying in the Masajid of Makkah and Al-Madinah
(94)
باب فَضْلِ الصَّلاَةِ بِمَسْجِدَىْ مَكَّةَ وَالْمَدِينَةِ ‏‏
Sahih Muslim 1396

Ibn Abbas (Allah be pleased with them) reported that a woman fell ill and she said:

In case Allah cures me I will certainly go and observe prayer in Bait al-Maqdis. She recovered and so she made preparations to go out (to that place). She came to Maimuna. the wife of Allah's Apostle (ﷺ). and after greeting her she informed her about it, whereupon she said: Stay here. and eat the provision (which you had made) and observe prayer In the mosque of the Messenger (ﷺ). for I heard Allah's Messenger (ﷺ) say: Prayer In it is better than a thousand prayers observed in other mosques except the mosque of the Ka'ba.
وَحَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، وَمُحَمَّدُ بْنُ رُمْحٍ، جَمِيعًا عَنِ اللَّيْثِ بْنِ سَعْدٍ، - قَالَ قُتَيْبَةُ حَدَّثَنَا لَيْثٌ، - عَنْ نَافِعٍ، عَنْ إِبْرَاهِيمَ بْنِ عَبْدِ اللَّهِ بْنِ مَعْبَدٍ، عَنِ ابْنِ عَبَّاسٍ، أَنَّهُ قَالَ إِنَّ امْرَأَةً اشْتَكَتْ شَكْوَى فَقَالَتْ إِنْ شَفَانِي اللَّهُ لأَخْرُجَنَّ فَلأُصَلِّيَنَّ فِي بَيْتِ الْمَقْدِسِ ‏.‏ فَبَرَأَتْ ثُمَّ تَجَهَّزَتْ تُرِيدُ الْخُرُوجَ فَجَاءَتْ مَيْمُونَةَ زَوْجَ النَّبِيِّ صلى الله عليه وسلم تُسَلِّمُ عَلَيْهَا فَأَخْبَرَتْهَا ذَلِكَ فَقَالَتِ اجْلِسِي فَكُلِي مَا صَنَعْتِ وَصَلِّي فِي مَسْجِدِ الرَّسُولِ صلى الله عليه وسلم فَإِنِّي سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏ "‏ صَلاَةٌ فِيهِ أَفْضَلُ مِنْ أَلْفِ صَلاَةٍ فِيمَا سِوَاهُ مِنَ الْمَسَاجِدِ إِلاَّ مَسْجِدَ الْكَعْبَةِ ‏"‏ ‏.‏
Reference : Sahih Muslim 1396
In-book reference : Book 15, Hadith 587
USC-MSA web (English) reference : Book 7, Hadith 3217
  (deprecated numbering scheme)