Mālik held two different views about someone who recalls that he has not performed witr while already engaged in the dawn (Fajr) prayer. The opinion backed by the legal principles of the scholars of Madinah is that he should carry on and not interrupt his obligatory prayer to offer witr, for if he remembered it after the salām he would not make it up, and witr is not classed with the obligatory prayers. Nor is it more binding than the case of a worshipper who begins the prayer with dry ablution (tayammum) and then finds water part-way through.
The Messenger of Allah ﷺ used to pray two rakʿahs before Zuhr, two before ʿAsr, two after Maghrib, and, once the time for Fajr had begun, two rakʿahs before the obligatory dawn prayer. He performed all of these in his home; yet whenever he entered the mosque at a time when prayer could be offered, he would pray two rakʿahs, and when he returned from a journey he would not enter his house until he had first gone to the mosque and prayed two rakʿahs there. All of this is commendable and recommended, and whoever does it is promised abundant reward. Of all these practices, Mālik considered the most emphatic—after witr—to be the two rakʿahs of Fajr and the two rakʿahs after Maghrib. In general, it is preferable to perform voluntary prayers at home, for the mosques were built for the obligatory congregational prayers.