Allah, exalted be His praise, says: "Indeed, Allah commands you to render trusts to those to whom they are due, and when you judge between people, to judge with justice." [Surah al-Nisa: 58]
And He said to His Prophet (peace and blessings be upon him): "And that you judge between them by what Allah has revealed, and do not follow their desires." [Surah al-Ma'idah: 49]
And the Messenger of Allah (peace and blessings be upon him) sent out governors (officials) and judges, and likewise the Caliphs after him did (the same), and it is they who are followed in the Shari'ah. Success and protection come only from Allah.
Sayyiduna Hudhayfah (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) sent a man as governor over Najran, and the people of Najran complained about him. He (peace and blessings be upon him) said: "I will send to you a trustworthy man who will fulfil the right of trust." The Companions of the Prophet (peace and blessings be upon him) looked on (eagerly), and he (peace and blessings be upon him) sent Sayyiduna Abu Ubaydah bin al-Jarrah (may Allah be pleased with him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النذور / 20149