It has been described by Kulaini and Sheikh on the authority of Imam Jafar Sadiq (A) that during the ‘Khilafat’ (Caliphate) of Hazrat Ali(A) two men, a slave and his master, were traveling to Kufa after performing Haj (Pilgrimage). The slave committed some mistake and the master beat him for that. The slave said to his master: “You are my slave, but still you are beating me for nothing.” Some other people wanted to decide between the two, but the slave did not admit his mistake but went on repeating that he was the master of the man accompanying him till they all entered Kufa. The master then said to his slave: “Let us go to Ameer-ul-Momineen for a Judgment.”
To that the slave agreed and they both went to Hazrat Ali (A), but while giving their statements before him both claimed to be the master of each other. The one who was actually the master stated weeping that he was the real master and that his father had sent him on pilgrimage to Mecca. He had taken a slave with him who had committed a mistake on his way back home and he therefore beat him. By saying that he was the master he wanted to take away all his possessions wrongfully. But the slave also repeated the same story on oath. Hazrat Ali (A) after hearing both, ordered them to present themselves before him the next day. Meanwhile, he ordered two holes to be made in a wall, each one large enough for the head of a man to pass through. When the two men came to him on the following day, he ordered each of them to put his head into the two holes. This done, he ordered his personal servant “Cut off the head of the slave.” No sooner the slave heard this order, he pulled out his head from the hole while the one who was the master did not move even slightly. Hazrat Ali (A) then reprimanded the slave, who went away with his master hanging his head in shame.