The witr prayer is actually not a separate obligatory prayer apart from the five times obligatory prayer. Rather, it is related to the Isha prayer. That is why if someone prays Witr before Isha prayer, his prayer will not be purified. The time of Witr prayer is the time of Isha prayer. But first Isha prayer must be performed. Then comes the turn of witr. details