Surah Al-Ma'idah 5:107
فَإِنْ عُثِرَ عَلَىٰٓ أَنَّهُمَا ٱسْتَحَقَّآ إِثْمًا فَـَٔاخَرَانِ يَقُومَانِ مَقَامَهُمَا مِنَ ٱلَّذِينَ ٱسْتَحَقَّ عَلَيْهِمُ ٱلْأَوْلَيَـٰنِ فَيُقْسِمَانِ بِٱللَّهِ لَشَهَـٰدَتُنَآ أَحَقُّ مِن شَهَـٰدَتِهِمَا وَمَا ٱعْتَدَيْنَآ إِنَّآ إِذًا لَّمِنَ ٱلظَّـٰلِمِينَ
But if it is found that those two were guilty of sin [i.e., 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 Allāh, "Our testimony is truer than their testimony, and we have not transgressed. Indeed, we would then be of the wrongdoers."
Translation: Saheeh International
Tafsir
But if it be discovered if it be ascertained after they have sworn their oaths that both of them have merited the suspicion of sin that is that they have done something to incur it in the way of a breach of faith or perjury in the testimony; …
Excerpt from Tafsir al-Jalalayn, commentary on 5:107, via Quran.com. The reader has the full commentary and 9 more tafsirs.