عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ: ((إِنَّ اللَّهَ يُؤَيِّدُ هَذَا الدِّينَ بِالرَّجُلِ الْفَاجِرِ))
It is narrated from Sayyiduna Abu Hurairah, may Allah be pleased with him, that the Messenger of Allah, peace and blessings be upon him, said: "Indeed, Allah Almighty supports this religion through a wicked man."
Brief Explanation
Benefits: … There are several forms of this; some are also related to the Prophetic era. For example, a sinful (fajir) ruler serving certain matters of Islam, or a sinful person constructing a mosque or a madrasa—these are examples of the same category.