Answer
(Fatwa: 776/596=L/1430)
One should perform first the sunnah if he expects to join the imam in last rak?ah or, according to the other opinion, in the last sitting (qa?dah), then he should join the fardh salah, but this sunnah should be offered outside the mosque at door or behind pillars away from the queues of salah. It is makrooh to perform sunnah adjacent to the queues of salah.
Allah (Subhana Wa Ta’ala) knows Best
Darul Ifta,
Darul Uloom Deoband
