Hadithcore
Sahih al-Bukhari, 350
sahih

Narrated `Aisha:

the mother of believers: Allah enjoined the prayer when He enjoined it, it was two rak`at only (in every prayer) both when in residence or on journey. Then the prayers offered on journey remained the same, but (the rak`at of) the prayers for non-travelers were increased.

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ صَالِحِ بْنِ كَيْسَانَ، عَنْ عُرْوَةَ بْنِ الزُّبَيْرِ، عَنْ عَائِشَةَ أُمِّ الْمُؤْمِنِينَ، قَالَتْ ‏

‏ فَرَضَ اللَّهُ الصَّلاَةَ حِينَ فَرَضَهَا رَكْعَتَيْنِ رَكْعَتَيْنِ فِي الْحَضَرِ وَالسَّفَرِ، فَأُقِرَّتْ صَلاَةُ السَّفَرِ، وَزِيدَ فِي صَلاَةِ الْحَضَرِ ‏

‏‏.‏

References2 variants
In-Book Reference
Book 8, Hadith 2
USC-MSA web (English) reference
Vol. 1, Book 8, Hadith 346 (deprecated numbering scheme)
Sharh · explanationclick to expand
The revelation came down to the Prophet (blessings and peace of Allah be upon him) gradually. By the wisdom of Allah (may He be exalted), some rulings were abrogated. This gradual approach was done to achieve some purposes, or to make things easy, or for other reasons. In this report, the Mother of the Believers ‘A’ishah (may Allah be pleased with her) narrates that in the beginning, before the Mi‘raj, all the prayers consisted of two rak‘ahs, whether one was at home or travelling. After that, the five daily prayers were enjoined, then obligatory prayers that were offered when not travelling were increased; Zuhr, ‘Asr and ‘Isha were increased to four rak‘ahs when not travelling, after having been two. Fajr, however, remained as two rak‘ahs because of the lengthy recitation in it; and Maghrib became three rak‘ahs, because it is the Witr of the day. Prayer offered when travelling remained two rak‘ahs, as it had been originally, except for Maghrib, which cannot be shortened. It was said that after the Prophet (blessings and peace of Allah be upon him) reached Madinah and settled there, prayer offered when travelling was made lighter with the revelation of the verse, {And when you travel throughout the land, there is no blame upon you for shortening the prayer, [especially] if you fear that those who disbelieve may disrupt [or attack] you. Indeed, the disbelievers are ever to you a clear enemy} [al-Nisa’ 4:101]. Thus we may say that when they said that prayer when travelling remained as it was, the Arabic phrase may be understood as meaning that the prayer when travelling ended up lighter and did not continue to be the same as it was initially enjoined..