Ibn 'Abbas reported: Allah has prescribed the prayer through the word of your Prophet (صَلَّی اللَّهُ عَلَيْهِ وَسَلَّمَ) as four rak'ahs when resident, two when travelling, and one when danger is present.
Hadith ReferenceSahih Muslim / The Book of Prayer - Travellers / Hadith: 687