When an Israelite and a Gentile have a lawsuit before thee, if thou canst, acquit the former according to the laws of Israel, and tell the latter such is our law; if thou canst get him off in accordance with Gentile law, do so, and say to the plaintiff such is your law; but if he cannot be acquitted according to either law, then bring forward adroit pretexts and secure his acquittal. These are the words of the Rabbi Ishmael. Rabbi Akiva says, " No false pretext should be brought forward, because, if found out, the name of God would be blasphemed; but if there be no fear of that, then it may be adduced.
When Truth Must Stand — Ishmael and Akiva on Justice
Bava Kamma 113a