Nafi' narrates from Sayyiduna Ibn Umar (may Allah be pleased with them both): "Whoever prays at night, let him make witr the last of his night prayer, before the morning." The Prophet (peace and blessings be upon him) used to command (them) in this way.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4829