Al-Ma'idah' - 5:107

فَإِنْ عُثِرَ عَلَى أَنَّهُمَا اسْتَحَقَّا إِثْمًا فَآخَرَانِ يِقُومَانُ مَقَامَهُمَا مِنَ الَّذِينَ اسْتَحَقَّ عَلَيْهِمُ الأَوْلَيَانِ فَيُقْسِمَانِ بِاللّهِ لَشَهَادَتُنَا أَحَقُّ مِن شَهَادَتِهِمَا وَمَا اعْتَدَيْنَا إِنَّا إِذًا لَّمِنَ الظَّالِمِينَ
[5:107]
Then if it becomes known that they both have been guilty of a sin, two others shall stand up in their place from among those who have a claim against them, the two nearest in kin; so they two should swear by Allah: Certainly our testimony is truer than the testimony of those two, and we have not exceeded the limit, for then most surely we should be of the unjust.
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 Allah: "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.