The Prophet (S) said: "Salat in the night is two by two. So when you fear the dawn (is near) then make it odd by one, and make that the last of your Salat odd." (Using translation from Tirmidhī 437)
عَنْ رَسُولِ اللهِ ﷺ أَنَّهُ قَالَ صَلَاةُ اللَّيْلِ مَثْنَى مَثْنَى فَإِذَا خِفْتَ الصُّبْحَ فَأَوْتِرْ بِوَاحِدَةٍ وَاجْعَلْ آخِرَ صَلَاتِكَ وِتْرًا