Narrated Ibn Umar:
Once a person asked Allah's Messenger peace be upon him about the night prayer. Allah's Apostle peace be upon him replied, "The night prayer is offered as two Rakat followed by two Rakat and so on and if anyone is afraid of the approaching dawn (Fajr prayer) he should pray one Rakat and this will be a Witr for all the Rakat which he has prayed before."