عَنِ ابْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُ عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ: ((صَلَاةُ الْمَغْرِبِ وَتْرُ صَلَاةِ النَّهَارِ فَأَوْتِرُوا صَلَاةَ اللَّيْلِ، وَصَلَاةُ اللَّيْلِ مَثْنَى مَثْنَى، وَالْوِتْرُ رَكْعَةٌ مِنْ آخِرِ اللَّيْلِ))
It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: Maghrib prayer is the witr of the day’s prayers, so make the night prayer also witr, and the night prayer is in sets of two rak‘ahs, and in the last part of the night, witr is one rak‘ah.