Sunan an-Nasa'i #1695
The Book of Qiyam Al-Lail (The Night Prayer) and Voluntary Prayers During the Day 20:98
It was narrated from Ibn 'Umar that:
He heard the Messenger of Allah (ﷺ) say: "Prayer at night is two rak'ahs by two rak'ahs, then when you fear tat dawn will break, pray witr with one rak'ah."