Sahih Muslim Book 20, Hadith Number 4542.

Chapter : When a ruler enjoins God consciousness and does justice. he will have a (great) reward.

It has been narrated on the authority of Abu Huraira that the Prophet of Allah (may peace be upon him) said: A commander (of the Muslims) is a shield for them. They fight behind him and they are protected by (him from tyrants and aggressors). If he enjoins fear of God, the Exalted and Glorious, and dispenses justice, there will be a (great) reward for him; and if he enjoins otherwise, it redounds on him.