In the case of a Jew and a gentile who approach the court for judgment in a legal dispute, if you can vindicate the Jew under Jewish law, vindicate him, and say to the gentile: This is our law. If he can be vindicated under gentile law, vindicate him, and say to the gentile: This is your law. And if it is not possible to vindicate him under either system of law, one approaches the case circuitously, seeking a justification to vindicate the Jew.
Bava Kamma 113a:21