It is narrated from the Prophet of Islam (PBUH) who said:
If two groups of my Ummah are righteous and honest, my Ummah will become righteous and honest, and if they are corrupted, my Ummah will be corrupted. The Prophet (PBUH) was asked: O’ the Prophet of Allah (SWT), who are these two groups? The Prophet (PBUH) replied: Faqihs and scholars, as well as the commanders and rulers of any society [1].
[1] Beharul Anwaar, Vol. 74, Page 154.
Source:en.shafaqna.com