Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
How do we reconcile between the mercy that the Prophet showed towards the disbelievers and the supplication that we read in the Wird of Imam Abu Bakr al-Sakran: ‘deflect their gaze and turn it away from us..’?
This supplication is for protection from a specific category of people, namely those who have wicked intentions from among mankind and jinn-kind. For their gaze to be deflected is in reality a mercy for them. This is similar to some of the supplications that the Prophet ﷺ made when he prayed against those who had wicked intentions and opposed him, such as: “O Allah, defeat them and shake them!” All of this is encompassed in the general meaning of mercy. It was appropriate for the state which he was in, placing everything in its correct context.
[The litany of Imam Abu Bakr al-Sakran ibn Shaykh Abd al-Rahman al-Saqqaf can be found in the Khulasat after Surah Ya Sin. It is a short but very powerful litany that should be read daily for protection from all types of evil].