Verses 106-108 of Chapter 5:
O Believers, when the time of death approaches anyone of you,and he
is going to make his will, the principle of evidence is that two just
men
from among you should act as witnesses. Or, if you are on a
journey and the calamity of death befalls you there, the two
witnesses may be taken from among the non Muslims. Then, if you have any doubt, both the witnesses should be
detained (in the mosque) after the Prayer, and they should testify
upon oath by Allah, "We are not going to sell our evidence for
any personal benefit, and even though he be our own relative, (we
will not be partial to him) ; we are not going to hide evidence which
we are giving for the sake of Allah for we shall be sinners if we do
so".[107-108But if it is discovered that the two had been guilty of the same sin,
then two other better qualified witnesses than the former, from among
those who were deprived of their right, should come forward and
testify upon oath, by Allah, "Our testimony is truer than their
testimony, and we have not made any transgression in our testimony:
we shall be among the unjust, if we do so." It is expected that
in this way the people will give only true evidence: or, at least,
they will fear lest their oaths should be contradicted by subsequent
oaths. Fear Allah and listen: Allah does not show His Guidance to
those who are disobedient.