The Prophet (pbuh) asked people to be just and kind. As the supreme judge and arbiter, as the leader of men, as generalissimo [head commander and chief] of a rising power, as a reformer and apostle, he had always to deal with men and their affairs. He had often to deal with mutually inimical and warring tribes when showing justice to one carried the danger of antagonizing the other, and yet he never deviated from the path of justice. In administering justice, he made no distinction between believers and nonbelievers, friends and foes, high and low. From numerous instances reported in the traditions, a few are given below.
Sakhar, a chief of a tribe, had helped Muhammad (pbuh) greatly in the siege of Taif, for which he was naturally obliged to him. Soon after, two charges were brought against Sakhar: one by Mughira of illegal confinement of his (Mughira's) aunt and the other by Banu Salim of forcible occupation of his spring by Sakhar. In both cases, he decided against Sakhar and made him undo the wrong. [Abu Dawud]
Abdullah Bin Sahal, a companion, was deputized to collect rent from Jews of Khaibar. His cousin Mahisa accompanied him but, on reaching Khaibar, they had separated. Abdullah was waylaid and done to death. Mahisa reported this tragedy to the Prophet (pbuh) but as there were no eye-witnesses to identify the guilty, he did not say anything to the Jews and paid the blood-money out of the state revenues. [Sahih Bukhari]
A woman of the Makhzoom family with good connections was found guilty of theft. For the prestige of the Quraish, some prominent people including Asmaa Bin Zaid interceded to save her from punishment. The Prophet (pbuh) refused to condone the crime and expressed displeasure saying,
"Many a community ruined itself in the past as they only punished the poor and ignored the offences of the exalted. By Allah, if Muhammad's (My) daughter Fatima would have committed theft, her hand would have been severed."[Sahih Bukhari]
The Jews, in spite of their hostility to the Prophet (pbuh), were so impressed by his impartiality and sense of justice that they used to bring their cases to him, and he decided them according to Jewish law. [Abu Dawud]
Once, while he was distributing the spoils of war, people flocked around him and one man almost fell upon him. He pushed the men with a stick causing a slight abrasion. He was so sorry about this that he told the man that he could have his revenge, but the man said, "O messenger of Allah, I forgive you." [Abu Dawud]
In his fatal illness, the Prophet (pbuh) proclaimed in a concourse assembled at his house that if he owed anything to anyone the person concerned could claim it; if he had ever hurt anyone's person, honour or property, he could have his price while he was yet in this world. A hush fell on the crowd. One man came forward to claim a few dirhams which were paid at once. [Ibn Hisham]