Sahih al-Bukhari 990
Sahih al-Bukhari · Book 14: Witr Prayer · What is said regarding the Witr prayer
Narrated Ibn `Umar:
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ ، قَالَ أَخْبَرَنَا مَالِكٌ ، عَنْ نَافِعٍ ، وَعَبْدِ اللَّهِ بْنِ دِينَارٍ ، عَنِ ابْنِ عُمَرَ ، أَنَّ رَجُلاً، سَأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ صَلاَةِ اللَّيْلِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " صَلاَةُ اللَّيْلِ مَثْنَى مَثْنَى، فَإِذَا خَشِيَ أَحَدُكُمُ الصُّبْحَ صَلَّى رَكْعَةً وَاحِدَةً، تُوتِرُ لَهُ مَا قَدْ صَلَّى " .
Once a person asked Allah's Messenger (ﷺ) (ﷺ) about the night prayer. Allah's Apostle (ﷺ) replied, "The night prayer is offered as two Rak`at followed by two Rak`at and so on and if anyone is afraid of the approaching dawn (Fajr prayer) he should pray one Rak`ah and this will be a Witr for all the Rak`at which he has prayed before."