5:107

فَإِنْ عُثِرَ عَلَىٰ أَنَّهُمَا اسْتَحَقَّا إِثْمًا فَآخَرَانِ يَقُومَانِ مَقَامَهُمَا مِنَ الَّذِينَ اسْتَحَقَّ عَلَيْهِمُ الْأَوْلَيَانِ فَيُقْسِمَانِ بِاللَّهِ لَشَهَادَتُنَا أَحَقُّ مِن شَهَادَتِهِمَا وَمَا اعْتَدَيْنَا إِنَّا إِذًا لَّمِنَ الظَّالِمِينَ

Transliteration:

Fa-in AAuthira AAala annahuma istahaqqa ithman faakharani yaqoomani maqamahuma mina allatheena istahaqqa AAalayhimu al-awlayani fayuqsimani biAllahi lashahadatuna ahaqqu min shahadatihima wama iAAtadayna inna ithan lamina alththalimeena

Word by Word:

Then if it is discovered that the two (were) guilty (of) sin, then (let) two others stand (in) their place from those who have a lawful right over them - the former two - and let them both swear by Allah "Surely our testimony (is) truer than testimony of the other two and not we have transgressed. Indeed, we then (will be) of the wrongdoers."

Translations:

But if afterwards it should come to light that the two [witnesses] have become guilty of [this very] sin, then two others - from among those whom the two former have deprived of their right - shall take their place and shall swear by God, "Our testimony is indeed truer than the testimony of these two, and we have not transgressed the bounds of what is right - or else, may we indeed be counted among the evildoers!"

But if it gets known that these two were guilty of the sin (of perjury), let two others stand forth in their places,- nearest in kin from among those who claim a lawful right: let them swear by God: "We affirm that our witness is truer than that of those two, and that we have not trespassed (beyond the truth): if we did, behold! the wrong be upon us!"

But then, if it is afterwards ascertained that both of them merit (the suspicion of) sin, let two others take their place of those nearly concerned, and let them swear by Allah, (saying): Verily our testimony is truer than their testimony and we have not transgressed (the bounds of duty), for them indeed we should be of the evil-doers.

If it be discovered that they are guilty of a sin, two others shall stand up in their place from among those against whom the first two have been guilty of a sin; so they shall swear by Allah: Certainly our testimony is truer than the testimony of those two, and We have not exceeded the limit, for then surely We should be unjust.

But if it is found that those two were guilty of perjury, let two others stand in their place [who are] foremost [in claim] from those who have a lawful right. And let them swear by Allah , "Our testimony is truer than their testimony, and we have not transgressed. Indeed, we would then be of the wrongdoers."