Sayyiduna Ibn Abbas (may Allah be pleased with them both) narrates that Allah Almighty has made obligatory, through the tongue of your Prophet (peace be upon him), four rak‘ahs in residence, two rak‘ahs in travel, and one rak‘ah in a state of fear.
Hadith Referenceصحيح ابن خزيمه / جماع أبواب صلاة الخوف / 1346