the Prophet pbuh was a member of hilf al fudul (the alliance of justice), a group which was established before prophethood due to a foreigner coming and complaining about a leader of Makkah having taken his merchandise with agreement to pay, and was later refusing to pay on account of his strength in the tribe and the other's weakness in the region.
some influential people with a sense of justice got together and formed a team willing to fight if necessary for the rights of the oppressed, among these influential and respected people was the Prophet pbuh
and they got the foreigner his money back.
long afterwards, with the cemented establishment of Islam, it was still a very powerful organization which even governors feared:
Husayn ibn Ali
once threatened the Medinan governor, who Hussayn believed gave an unjust decision, that he would take the case to the members of Hilf al-Fudul, at this the governor bowed.
Allah's Messenger (pbuh) said:
The prayer of the oppressed is answered, even if he is a sinner as his sinning is only against his own soul,'
Saheehul-Jam'i, no. 3377.