Mutarrif narrates from al-Sha'bi (may Allah have mercy on him) that two men testified before Sayyiduna Ali (may Allah be pleased with him) against a man for theft, and Sayyiduna Ali (may Allah be pleased with him) cut off his hand. Then they brought another man and said: This is the thief, not the first one. So Sayyiduna Ali (may Allah be pleased with him) made them liable for the blood money (diyah) of the first man's hand, and said: "Had I known that you did it deliberately, I would have cut off your hands." But he did not cut off the second man's hand.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 21192