عَنْ مُجَاهِدٍ عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُ قَالَ: فَرَضَ اللَّهُ عَزَّ وَجَلَّ صَلَاةَ الْحَضَرِ أَرْبَعًا وَفِي السَّفَرِ رَكْعَتَيْنِ، وَالْخَوْفِ رَكْعَةً عَلَى لِسَانِ نَبِيِّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ
Sayyiduna Abdullah bin Abbas (may Allah be pleased with him) says: Allah Almighty, through the tongue of His Prophet, made four rak‘ahs obligatory for the prayer at home, two rak‘ahs for the prayer during travel, and one rak‘ah for the prayer in fear.