Hazrat Ali (A) seeing this...
Hazrat Ali (A) seeing this, ordered her to be kept in confinement, separate from other witness. He then caned the second witness before him and pointing to his sword, said to her: “Do you see this sword? If you do not tell the truth, I shall behead you with this sword. And remember that the woman who has just gone out has told me the truth and, therefore, I have given her pardon.
If you tell me the true story, the same you shall get.” Hearing this, the second woman related the true story of the case, out of fear of her life. Having heard the truth from the second witness Amir-ul- Momenin (A) said, “After Daniel, the Prophet, I am the first man who has forced different statements from two witnesses.” Thereafter, he ordered punishment to be accorded to the wife of the man in question. He also ordered the man to divorce his wife and marry the innocent girl.
When his orders were carried out, he paid the dowry to the girl from his own pocket. He also fined the four women who had stood witnesses in the case, one hundred Dirhams each, and gave the whole amount of penalty to the girl. After this strange but righteous judgement Hazrat Omar (RA) besought the favour of Amir-ul-Momenin (A) of telling him the story of Hazrat Daniel (A).
Hazrat Ali (A) acceding to his request told him the following story: “Hazrat Daniel (A) was an orphan, who had lost his father and mother both. At that time the ruler was one from Bani Israel and had two Qazis among his courtiers. Both of these Qazis used to visit the court of the king accompanied by a very pious and godly man of the day.
Once the king wanted to send a trustworthy person on an urgent official business outside the dominion of his empire and requested the two Qazis to help him in selecting of someone worthy for the purpose. The Qazis advised the king to entrust the work to the same pious and godly man who used to visit his court every now and then alongwith themselves. Acting on their advice the king sent the pious man with necessary instructions on the fateful journey.
Now per chance the pious man had a very pretty and beautiful wife who was also pious and godly like her husband. However, the man while going out of the country gave her in the care of the aforesaid Qazis, saying: I give her in your care with the will that you will treat her with virtue and will take care of her daily needs. Then he set off at his journey.