O ye who believe! stand out firmly for justice, as witnesses to Allah, even as against yourselves, or your parents, or your kin, and whether it be (against) rich or poor: for Allah can best protect both. Follow not the lusts (of your hearts), lest ye swerve, and if ye distort (justice) or decline to do justice, verily Allah is well-acquainted with all that ye do.
Yahiya Emerick writes,
We are counseled to be just and fair, no matter who is involved, for God will know if we give false testimony. The Prophet said, “The three actions that are the most difficult to succeed at are to be fair with others when you are involved in the situation, helping others by giving to them from your own possessions, and trying to remember God at all times.” One of the highest forms of faith, in Islamic theology, involves being able to confront one’s own selfishness – without fear of all that you may lose – and speak the truth. The Prophet also said that the best witness is the one who gives his testimony before he’s even asked. Imam Mawardi (d. 1058) once commented that justice “is the basis of a thriving economy, strong families and a stable government. Nothing devastates the land nor corrupts the mind as quickly as tyranny.“ (Nadr an-Na’im)
Emerick, Yahiya. The Meaning of the Holy Qur’an in Today’s English (p. 829). Unknown. Kindle Edition.